chore: bump versions (#502) #62
This file contains hidden or 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 | |
jobs: | |
changesets: | |
name: 📋 Check Changesets | |
runs-on: ubuntu-latest | |
# Don't run on forks. We can and should only release from the main repo. | |
if: github.repository == 'Tap30/web-components' | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
outputs: | |
published: ${{ steps.cs.outputs.published }} | |
pr: ${{ steps.cs.outputs.pullRequestNumber }} | |
steps: | |
- name: ☁️ checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 🔧 setup pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- name: 🔧 setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: 📦 install dependencies | |
run: pnpm install | |
- name: 🔎 Create Release PR or Publish Packages | |
# The id of this step must not be "changesets", or else the step will be invisible | |
# in the list of steps from the GitHub UI when the action runs (though it will still | |
# run, and its output will appear in the raw logs). Unknown why this is the case, | |
# see https://github.com/changesets/action/issues/149 for discussion. | |
id: cs | |
uses: changesets/action@v1 | |
with: | |
title: "chore: bump versions" | |
commit: "chore: bump versions" | |
publish: "pnpm release" | |
version: "pnpm changesets:apply" | |
createGithubReleases: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
deploy-docs: | |
name: Prepare and Deploy Documentation | |
needs: changesets | |
if: needs.changesets.outputs.published == 'true' | |
uses: ./.github/workflows/gh-pages.yml |