forked from usecannon/cannon
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.4 KB
/
release-please.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
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: Create Release
jobs:
release-main:
runs-on: ubuntu-latest
steps:
- name: Run Release-Please
uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
command: manifest
token: ${{ secrets.GITHUB_TOKEN }}
default-branch: main
# The logic below handles the npm publication:
- name: Checkout Repository
if: ${{ steps.release.outputs.releases_created }}
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
if: ${{ steps.release.outputs.releases_created }}
with:
cache: npm
node-version: '20.5.1'
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
if: ${{ steps.release.outputs.releases_created }}
run: npm ci
# Release Please has already incremented versions and published tags, so we just
# need to publish all unpublished versions to NPM here
# See: https://github.com/lerna/lerna/tree/main/libs/commands/publish#bump-from-package
- name: Publish to NPM
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npx lerna publish from-package --no-push --no-private --yes