Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [CI]
types:
- completed
branches:
- main
permissions:
contents: write
jobs:
release:
if: >-
${{
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'main' &&
!contains(github.event.workflow_run.head_commit.message || '', '[skip ci]') &&
!contains(github.event.workflow_run.head_commit.message || '', '[ci skip]')
}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.event.workflow_run.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Project
uses: ./.github/actions/setup-project
- name: Build dist
run: npm run bundle
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ======================================================================
# If your branch is protected, remove the steps above and use this one instead.
# Additional setup:
# - See the following gist for detailed instructions:
# https://gist.github.com/0xernesto/a8065cce55940e6ccc523664a87ee9bc
# - You must set up a GitHub App and add the following repository secrets:
# RELEASER_ID: The App ID of your GitHub App
# RELEASER_PRIVATE_KEY: The private key for your GitHub App
# ======================================================================
# steps:
# - name: Generate token
# id: generate-token
# uses: actions/create-github-app-token@v3
# with:
# client-id: ${{ secrets.RELEASER_ID }}
# private-key: ${{ secrets.RELEASER_PRIVATE_KEY }}
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# persist-credentials: false
# ref: ${{ github.event.workflow_run.head_sha }}
# token: ${{ steps.generate-token.outputs.token }}
# - name: Setup Project
# uses: ./.github/actions/setup-project
# - name: Build dist
# run: npm run bundle
# - name: Semantic Release
# uses: cycjimmy/semantic-release-action@v4
# env:
# GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}