Version Packages (#2607) #792
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: ci | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release-pkg: | |
name: Version or publish packages | |
runs-on: ubuntu-latest | |
outputs: | |
published: ${{ steps.changesets.outputs.published }} | |
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure git user (trigger actor) | |
uses: ./.github/workflows/actions/config-git-user | |
- name: Setup node and install deps | |
uses: ./.github/workflows/actions/node-setup | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
title: '🤖 Bip Bop - Fusion Framework Release' | |
createGithubReleases: true | |
setupGitUser: false | |
version: pnpm changeset:version | |
publish: pnpm changeset:publish | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: convert Changeset PR to draf | |
if: steps.changesets.outputs.published == 'false' && steps.changesets.outputs.pullRequestNumber | |
run: gh pr ready ${{ steps.changesets.outputs.pullRequestNumber }} --undo | |
env: | |
GH_TOKEN: ${{ github.token }} | |
documentation: | |
name: Update documentation | |
needs: release-pkg | |
if: needs.release-pkg.outputs.published == 'true' | |
uses: ./.github/workflows/generate-docs.yml | |
secrets: inherit | |