Manual workflow #34
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 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: | |
tag: | |
# Friendly description to be shown in the UI instead of 'name' | |
description: 'Existing tag to create release from.' | |
# Default value if no value is explicitly provided | |
default: '0.0.0' | |
# Input has to be provided for the workflow to run | |
required: true | |
# The data type of the input | |
type: string | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
- name: Build plugin | |
run: | | |
npm install | |
npm run dist | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
tag="${{inputs.tag}}" | |
gh release create "$tag" \ | |
--title="$tag" \ | |
--draft \ | |
main.js manifest.json styles.css |