chore: don't skip #2
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: Prepare Release | |
on: | |
push: | |
branches: | |
- main | |
- canary | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
permissions: | |
contents: read # for checkout | |
jobs: | |
release: | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
id-token: write # to enable use of OIDC for npm provenance | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: npm | |
- run: npm ci | |
- run: npx semantic-release | |
# Don't allow interrupting the release step if the job is cancelled, as it can lead to an inconsistent state | |
# e.g. git tags were pushed but it exited before `npm publish` | |
if: always() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
- uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.ECOSPARK_APP_ID }} | |
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }} | |
- uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5 | |
with: | |
author: github-actions <github-actions@github.com> | |
body: I ran `npx semantic-release` 🧑💻 | |
branch: release/${{ github.ref_name }} | |
commit-message: 'chore(release): 🤖 ✨ [skip ci]' | |
labels: 🤖 bot | |
title: 'chore(release): publish changes on ${{ github.ref_name }}' | |
token: ${{ steps.generate-token.outputs.token }} |