Skip to content

Commit 10d5e0a

Browse files
👷 Should fix release GH action, attempt 2.
1 parent f950877 commit 10d5e0a

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,24 @@ jobs:
3434
release:
3535
needs: test
3636
runs-on: ubuntu-latest
37+
permissions:
38+
contents: write
39+
issues: write
40+
pull-requests: write
3741
if: ${{ github.repository == 'CosmicDNA/three-stdlib' && contains('refs/heads/main,refs/heads/beta,refs/heads/alpha',github.ref) && github.event_name == 'push' }}
3842
steps:
3943
- name: Cancel Previous Runs
4044
uses: styfle/cancel-workflow-action@0.6.0
4145
with:
4246
access_token: ${{ secrets.GITHUB_TOKEN }}
4347
- name: Checkout repo
44-
uses: actions/checkout@v2
48+
uses: actions/checkout@v4
49+
with:
50+
fetch-depth: 0
4551
- name: Setup node
46-
uses: actions/setup-node@v2
52+
uses: actions/setup-node@v4
4753
with:
48-
node-version: '14.x'
54+
node-version: '20.x'
4955
- name: Install deps
5056
# this runs a build script so there is no dedicated build
5157
run: yarn install
@@ -55,6 +61,8 @@ jobs:
5561
uses: cycjimmy/semantic-release-action@v4
5662
with:
5763
semantic_version: 24
64+
extra_plugins: |
65+
@semantic-release/git
66+
@semantic-release/changelog
5867
env:
5968
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,34 @@
5353
"scripts": {
5454
"build": "rimraf dist && vite build && tsc --emitDeclarationOnly && copyfiles -u 1 \"src/**/*.d.ts\" dist && copyfiles package.json README.md LICENSE dist && json -I -f dist/package.json -e \"this.private=undefined;this.type=\\\"module\\\";\"",
5555
"lint": "tsc --noEmit"
56+
},
57+
"release": {
58+
"branches": [
59+
"main",
60+
"beta",
61+
"alpha"
62+
],
63+
"plugins": [
64+
"@semantic-release/commit-analyzer",
65+
"@semantic-release/release-notes-generator",
66+
"@semantic-release/changelog",
67+
[
68+
"@semantic-release/npm",
69+
{
70+
"npmPublish": false
71+
}
72+
],
73+
[
74+
"@semantic-release/git",
75+
{
76+
"assets": [
77+
"package.json",
78+
"CHANGELOG.md"
79+
],
80+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
81+
}
82+
],
83+
"@semantic-release/github"
84+
]
5685
}
5786
}

0 commit comments

Comments
 (0)