Skip to content

Commit 57a9ef6

Browse files
committed
Github releases
1 parent f41d9e8 commit 57a9ef6

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Diff for: .github/workflows/main.yml

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
1-
name: 'npm publish && test'
1+
name: Release
2+
3+
permissions:
4+
contents: write
25

36
on:
47
push:
5-
branches:
6-
- main
7-
- master
8-
release:
9-
types: [created]
10-
workflow_dispatch:
8+
tags:
9+
- 'v*'
1110

1211
jobs:
1312
build:
1413
runs-on: ubuntu-latest
1514

1615
permissions:
17-
contents: read
16+
contents: write
1817
packages: write
1918

2019
steps:
21-
- uses: actions/checkout@v2
22-
- uses: actions/setup-node@v2
20+
- uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
- uses: actions/setup-node@v3
2324
with:
24-
node-version: '16'
25+
node-version: 18.x
2526
registry-url: 'https://registry.npmjs.org'
2627
- run: npm version
2728
- run: npm install
2829
- run: npm publish --access public
2930
env:
3031
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
- run: npx changelogithub
33+
env:
34+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)