fix: ensure the target output is esm or cjs #8
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 | |
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 }} |