comments #17
Workflow file for this run
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: Build and Publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "**" | |
| tags-ignore: | |
| - "**" | |
| env: | |
| SECRETS: ${{ toJSON(secrets) }} | |
| GITHUB_TOKEN: ${{ secrets.SHARED_GH_TOKEN }} | |
| jobs: | |
| build: | |
| name: Publish Packages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{github.event.pull_request.head.sha}} | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: journeyapps-platform/ci-actions | |
| token: ${{ secrets.SHARED_GH_TOKEN }} | |
| path: .github/ci | |
| ref: v1 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.16 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: 10 | |
| - name: Install Dependencies | |
| uses: ./.github/ci/actions/npm-install | |
| with: | |
| client: pnpm | |
| - name: Has changesets | |
| uses: bluwy/detect-changesets-action@v1 | |
| id: detect | |
| - name: Build | |
| run: pnpm build | |
| - name: Create Release Pull Request or Publish to npm | |
| if: ${{ github.ref == 'refs/heads/master' && steps.detect.outputs.has-changesets == 'true' }} | |
| id: changesets | |
| uses: changesets/[email protected] | |
| with: | |
| version: pnpm ci:version | |
| commit: "chore: update versions" | |
| title: "[Chore] update versions" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish production packages. | |
| if: ${{ github.ref == 'refs/heads/master' && steps.detect.outputs.has-changesets == 'false' && success() }} | |
| run: | | |
| pnpm ci:publish |