-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (37 loc) · 1.21 KB
/
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
on:
# run after the "build" workflow
workflow_run:
workflows: [build]
branches: [main]
types:
- completed
name: Release
jobs:
changelog:
# only run if tests succeed.
if: ${{ github.event.workflow_run.conclusion == 'success' }}
outputs:
release_created: ${{ steps.rp.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: rp
with:
release-type: node
package-name: dagula
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Other Changes","hidden":false},{"type":"refactor","section":"Other Changes","hidden":false}]'
publish:
# only publish if there is a change to the changelog
needs: changelog
if: ${{ needs.changelog.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version: 18
cache: 'npm'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}