Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/publish-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,29 @@ jobs:
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"


- name: Bump version and push tag
- name: Bump version, update manifest, commit and tag
run: |
set -euo pipefail

npm install
npm version ${{ github.event.inputs.release_type }} -m "chore: bump version to %s"

# 1) Bump package.json + package-lock.json but DO NOT commit/tag yet
npm version ${{ github.event.inputs.release_type }} --no-git-tag-version

# 2) Read the new version from package.json
NEW_VERSION=$(node -p "require('./package.json').version")
echo "New version is: $NEW_VERSION"

# 3) Update manifest.json's "version" field to match
jq --arg v "$NEW_VERSION" '.version = $v' manifest.json > manifest.json.tmp
mv manifest.json.tmp manifest.json

# 4) Commit everything and create an annotated tag
git add package.json package-lock.json manifest.json
git commit -m "chore: bump version to $NEW_VERSION"
git tag -a "v$NEW_VERSION" -m "v$NEW_VERSION"

# 5) Push commit and tag
git push --follow-tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"requiredSdkVersion": "~0.0.84",
"name": "TourPlugin",
"version": "0.0.1",
"version": "0.0.3",
"javascriptEntrypointUrl": "TourPlugin.js"
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbb-plugin-tour",
"version": "0.0.2",
"version": "0.0.3",
"private": false,
"main": "./src/index.tsx",
"dependencies": {
Expand Down