Skip to content

Commit 57e5e2b

Browse files
committed
chore: enhance semantic-release configuration and update CI workflow for full history fetching
1 parent 18471b4 commit 57e5e2b

3 files changed

Lines changed: 11 additions & 47 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,24 @@ jobs:
5656
needs: test
5757
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
5858
permissions:
59-
contents: write
60-
issues: write
59+
contents: write # for pushing tags/commits
60+
issues: write # for the "fail" plugin
6161
runs-on: ubuntu-latest
6262
steps:
6363
- uses: actions/checkout@v3
64+
with:
65+
fetch-depth: 0 # full history needed for tagging
66+
- name: Configure npm for semantic-release
67+
run: |
68+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
6469
- name: Use Node.js
6570
uses: actions/setup-node@v3
6671
with:
6772
node-version: '20.x'
6873
registry-url: 'https://registry.npmjs.org'
6974
- run: npm ci
7075
- name: Run semantic-release
71-
run: npm run release
7276
env:
73-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
79+
run: npm run release

.github/workflows/release.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"@semantic-release/release-notes-generator",
66
["@semantic-release/changelog", {"changelogFile": "CHANGELOG.md"}],
77
["@semantic-release/npm", {"npmPublish": true}],
8-
["@semantic-release/github", {"assets": "dist/**"}],
8+
["@semantic-release/github", {"assets": "dist/**", "labels": ["bug", "release"]}],
99
["@semantic-release/git", {
1010
"assets": ["package.json", "CHANGELOG.md"],
1111
"message": "chore(release): ${nextRelease.version} [skip ci]"

0 commit comments

Comments
 (0)