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
20 changes: 0 additions & 20 deletions .github/workflows/bump-alpha.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/bump-beta.yml

This file was deleted.

68 changes: 0 additions & 68 deletions .github/workflows/bump-common.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Bump"

on:
workflow_run:
workflows:
- "Publish"
types:
- completed
branches:
- "master"
- "master-2"
- "master-beta"

concurrency:
group: bump-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: false

jobs:
bump:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: "Bump Version"
timeout-minutes: 60
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0
token: ${{ github.token }}

- name: "Bump version"
uses: phips28/gh-action-bump-version@v11.0.7
env:
GITHUB_TOKEN: ${{ github.token }}
with:
default: "${{ (github.event.workflow_run.head_branch == 'master-2' || github.event.workflow_run.head_branch == 'master-beta') && 'prerelease' || 'minor' }}"
preid: "${{ github.event.workflow_run.head_branch == 'master-2' && 'alpha' || (github.event.workflow_run.head_branch == 'master-beta' && 'beta' || '') }}"
tag-prefix: "release-"
bump-policy: last-commit
check-last-commit-only: true
target-branch: ${{ github.event.workflow_run.head_branch }}
commit-message: "ci: version bump to {{version}} [skip ci]"
18 changes: 8 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: "Publish"

on:
workflow_run:
workflows:
- "Bump Alpha"
- "Bump Minor"
types:
- completed
push:
branches:
- "master"
- "master-2"
- "master-beta"

concurrency:
group: publish-${{ github.event.workflow_run.head_branch }}
group: publish-${{ github.ref_name }}
cancel-in-progress: false

permissions:
Expand All @@ -19,19 +18,18 @@ permissions:
jobs:
publish:
name: "Publish"
if: ${{ github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
ref: ${{ github.sha }}
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish --tag "${{ github.event.workflow_run.name == 'Bump Minor' && 'latest' || (github.event.workflow_run.name == 'Bump Alpha' && 'alpha' || 'beta') }}" --access public --provenance
- run: npm publish --tag "${{ github.ref_name == 'master-2' && 'alpha' || (github.ref_name == 'master-beta' && 'beta' || 'latest') }}" --access public --provenance
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
},
"git": {
"tagName": "v${version}"
"tagName": "release-${version}"
},
"github": {
"release": true
Expand Down
Loading