Skip to content

Release

Release #37

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
id-token: write # added for provenance
env:
HUSKY: 0
jobs:
release:
name: Release
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
commit: 'chore: release'
title: 'chore: release'
publish: 'pnpm release'
env:
GITHUB_TOKEN: ${{ secrets.CHANGESET_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
on-ci-fail:
name: 'Failure'
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'CI failed. Release won't be executed'