-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (39 loc) · 1.2 KB
/
Deploy.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
name: Deploy Workflow
concurrency: deployment
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
environment: deployment
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
scope: '@spotify-confidence'
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test
- run: yarn format:check
- run: yarn lint
- run: |
git config user.name github-release-bot
git config user.email [email protected]
- run: yarn release --yes
- name: Authenticate with Registry
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
- run: yarn publish-if-missing
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}