-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.25 KB
/
publish-release.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
name: Publish Release
on:
workflow_dispatch:
jobs:
publish_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: yarn
registry-url: https://registry.npmjs.org
- name: yarn install
run: yarn install --frozen-lockfile --prefer-offline
- uses: release-drafter/release-drafter@v5
id: release_drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: bump version
run: npm version "${{ steps.release_drafter.outputs.tag_name }}" --git-tag-version false
- name: publish to npm
run: npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: push version
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git add .
git commit -m ":bookmark: version bump"
git push
- uses: release-drafter/release-drafter@v5
id: release_drafter_publish
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}