Skip to content

Commit 7ce994e

Browse files
authored
chore: update action (#2315)
1 parent b3ab757 commit 7ce994e

File tree

5 files changed

+56
-38
lines changed

5 files changed

+56
-38
lines changed

.github/workflows/release.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
on:
3+
workflow_run:
4+
workflows: ["Lint & Unit Test"]
5+
branches: [master]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: read # for checkout
11+
12+
jobs:
13+
release:
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
name: Release
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write # to be able to publish a GitHub release
19+
issues: write # to be able to comment on released issues
20+
pull-requests: write # to be able to comment on released pull requests
21+
id-token: write # to enable use of OIDC for npm provenance
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
with:
26+
fetch-depth: 0
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: "lts/*" # semantic-release requires Node >= 18
31+
- name: Install dependencies
32+
run: npm clean-install
33+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
34+
run: npm audit signatures
35+
- name: Release
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
run: npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && echo release success

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ docs
2929
.travis.yml
3030
karma.sauce.conf.js
3131
.github
32+
.releaserc

.releaserc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"branches": ["master"],
3+
"prepare": [
4+
{
5+
"path": "@semantic-release/changelog"
6+
},
7+
[
8+
"@semantic-release/git",
9+
{
10+
"assets": [
11+
"CHANGELOG.md"
12+
]
13+
}
14+
]
15+
]
16+
}

.travis.yml

-23
This file was deleted.

package.json

-15
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,6 @@
3636
"src/**/*"
3737
]
3838
},
39-
"release": {
40-
"prepare": [
41-
{
42-
"path": "@semantic-release/changelog"
43-
},
44-
[
45-
"@semantic-release/git",
46-
{
47-
"assets": [
48-
"CHANGELOG.md"
49-
]
50-
}
51-
]
52-
]
53-
},
5439
"keywords": [
5540
"dayjs",
5641
"date",

0 commit comments

Comments
 (0)