-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.35 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
40
41
42
43
44
45
46
47
48
name: release-please
concurrency:
group: ${{ github.workflow }}
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
steps:
- name: Create Release
id: release
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
# see https://github.com/google-github-actions/release-please-action#automating-publication-to-npm
- name: Checkout Repository
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Node.js
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Install
if: ${{ steps.release.outputs.release_created }}
uses: bahmutov/npm-install@e5c7e14408aa6089501de32bd16123b41738047e # v1.10.2
- name: Build
if: ${{ steps.release.outputs.release_created }}
run: npm run build
- name: Publish to npm
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish