-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.48 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
49
50
51
52
53
54
55
56
57
58
name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
unit-tests:
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main
nuts:
needs: unit-tests
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
secrets: inherit
strategy:
matrix:
os: [windows-latest]
fail-fast: false
with:
os: ${{ matrix.os }}
release:
needs: [unit-tests, nuts]
name: Release
runs-on: ubuntu-latest
steps:
- name: Release Please
id: release
uses: googleapis/release-please-action@v4
with:
release-type: node
- name: Checkout
uses: actions/[email protected]
if: ${{ steps.release.outputs.release_created == 'true' }}
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 18
cache: yarn
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created == 'true' }}
- name: Install Dependencies
run: yarn install
if: ${{ steps.release.outputs.release_created == 'true' }}
- name: Build
run: yarn build
if: ${{ steps.release.outputs.release_created == 'true' }}
- name: Publish to NPM
run: npm publish --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created == 'true' }}