ci(changesets): version packages (#298) #417
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: | |
group: release-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set committer info | |
## attribute the commit to cypress-bot: https://github.community/t/logging-into-git-as-a-github-app/115916 | |
run: | | |
git config --local user.email "${{ secrets.CYPRESS_BOT_APP_ID }}+cypress-bot[bot]@users.noreply.github.com" | |
git config --local user.name "cypress-bot[bot]" | |
- name: Yarn install | |
run: yarn install | |
- name: Build components | |
run: yarn build:components | |
- name: Configure .npmrc | |
run: | | |
cat << EOF > "$HOME/.npmrc" | |
//registry.npmjs.org/:_authToken=$NPM_TOKEN | |
EOF | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Set version numbers | |
run: node scripts/set-version.mjs | |
- name: Create release Pull Request or publish to NPM | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: yarn changeset publish | |
commit: 'ci(changesets): version packages' | |
title: 'ci(changesets): version packages' | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |