Manual - Semantic Release #4
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: Manual - Semantic Release | |
on: | |
workflow_dispatch: | |
inputs: | |
git-ref: | |
description: Git branch reference | |
default: main | |
required: true | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-20.04 | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
if: github.event.inputs.git-ref == 'main' | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
if: github.event.inputs.git-ref == 'main' | |
- name: Copy rules | |
run: | | |
cp .github/config/.releaserc.json . | |
- name: Install dependencies | |
run: npm install | |
if: github.event.inputs.git-ref == 'main' | |
- name: Release | |
run: npx semantic-release | |
if: github.event.inputs.git-ref == 'main' | |
env: | |
CI: true | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} |