Merge pull request #143 from quiltt/changeset-release/main #189
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: Release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Create .npmrc in home folder | |
run: | | |
echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" >> $HOME/.npmrc | |
echo "strict-peer-dependencies=false" >> $HOME/.npmrc | |
echo "git-checks=false" >> $HOME/.npmrc | |
- name: Authenticate with npm registry | |
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Create release pull request or release to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
version: pnpm run version | |
publish: pnpm run publish | |
title: Version and Release Packages | |
createGithubReleases: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |