-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.9 KB
/
release-and-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
45
46
47
48
name: Release and Publish
run-name: Release and Publish
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release-Please
uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
token: ${{ secrets.BASALT_TOKEN }}
changelog-types: >
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
{ "type": "build", "section": "Build System", "hidden": false },
{ "type": "test", "section": "Tests", "hidden": false },
{ "type": "ci", "section": "Continuous Integration", "hidden": false },
{ "type": "docs", "section": "Documentation", "hidden": false },
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
{ "type": "revert", "section": "Reverts", "hidden": false },
{ "type": "style", "section": "Styles", "hidden": false }
]
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Publish
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm install
if: ${{ steps.release.outputs.release_created }}
- run: npm run build
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}