File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Publish
1+ name : Release
22
3+ # Triggered by pushing a semver tag (e.g. v2.1.3).
4+ # 1. Creates a GitHub Release with auto-generated notes.
5+ # 2. Builds dist/ and force-pushes action.yml + dist/ to the tag.
6+ # 3. Updates the major version tag (v2.1.3 -> v2).
37on :
4- release :
5- types : [published, edited]
8+ tags :
9+ - ' v*.*.*'
10+
11+ permissions :
12+ contents : write
613
714jobs :
815 notify-start :
@@ -14,17 +21,32 @@ jobs:
1421 slack-channel-id : ${{ vars.SLACK_CHANNEL_ID }}
1522 stage : start
1623
17- build :
18- name : Build
24+ release :
1925 runs-on : ubuntu-latest
2026 steps :
2127 - name : Checkout
22- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+ uses : actions/checkout@v6
29+ with :
30+ fetch-depth : 0
31+
32+ - name : Setup Node.js
33+ uses : actions/setup-node@v6
2334 with :
24- ref : ${{ github.event.release.tag_name }}
35+ node-version : 24
36+ cache : npm
37+
2538 - name : Install deps and build
2639 run : npm ci && npm run build
27- - uses : JasonEtco/build-and-tag-action@v2
40+
41+ - name : Create GitHub Release with auto-generated notes
42+ uses : softprops/action-gh-release@v3
43+ with :
44+ generate_release_notes : true
45+ # Mark as prerelease if the tag contains a hyphen (e.g. v2.1.3-beta.1).
46+ prerelease : ${{ contains(github.ref_name, '-') }}
47+
48+ - name : Build and tag (force-pushes dist/ to the tag and updates major/minor refs)
49+ uses : JasonEtco/build-and-tag-action@v2
2850 env :
2951 GITHUB_TOKEN : ${{ github.token }}
3052
You can’t perform that action at this time.
0 commit comments