-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (48 loc) · 1.41 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
47
48
49
50
51
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
release_tag_name: ${{ steps.release.outputs.release_tag_name }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
monorepo-tags: true
Build-And-Publish:
environment: deployment
runs-on: ubuntu-latest
needs: [release-please]
if: ${{ needs.release-please.outputs.releases_created }}
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
- id: setup-environment
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}
- run: yarn build
- name: Publish to NPM
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
echo "@spotify-confidence:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> .npmrc
yarn publish-if-missing