-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.14 KB
/
npm-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish to NPM
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn
- run: yarn test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Git configuration
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- run: yarn
- run: npm version patch
- run: npm publish --patch
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Update change log
run: |
sed -i "s/## Unreleased/## Unreleased\n\n## $(npm info airsync version)/g" CHANGELOG.md
- name: Commit the update
run: |
git add .
git commit --amend --no-edit
git push origin HEAD:main