initial commit #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- 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 | |
- 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 }} |