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
# This is a basic workflow that is manually triggered | |
name: Manual Trigger Release Workflow | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
# Inputs the workflow accepts. | |
inputs: | |
name: | |
# Friendly description to be shown in the UI instead of 'name' | |
description: 'Remarks' | |
# Default value if no value is explicitly provided | |
default: 'trigger a release' | |
# Input has to be provided for the workflow to run | |
required: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
trigger-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set node version to 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependency | |
run: | | |
yarn | |
- name: Create Release | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "cumt-robin" | |
yarn create-release |