📢 Manual Publish #51
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 Publish" | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: >- | |
The branch, tag or SHA to checkout. When checking out the | |
repository that triggered a workflow, this defaults to the reference | |
or SHA for that event. Otherwise, uses the default branch. | |
required: true | |
default: main | |
extension: | |
description: The Extension to publish | |
type: choice | |
# Options are generated from `npm run gen:workflow` | |
options: | |
- "." | |
- extensions/arabic | |
- extensions/australian-english | |
- extensions/austrian-german | |
- extensions/basque | |
- extensions/british-english | |
- extensions/bulgarian | |
- extensions/canadian-english | |
- extensions/catalan | |
- extensions/croatian | |
- extensions/czech | |
- extensions/danish | |
- extensions/dutch | |
- extensions/esperanto | |
- extensions/estonian | |
- extensions/french | |
- extensions/french-reforme | |
- extensions/german | |
- extensions/greek | |
- extensions/hebrew | |
- extensions/hunspell-syntax | |
- extensions/italian | |
- extensions/lithuanian | |
- extensions/medical-terms | |
- extensions/norwegian-bokmal | |
- extensions/persian | |
- extensions/polish | |
- extensions/portuguese | |
- extensions/portuguese-brazilian | |
- extensions/russian | |
- extensions/scientific-terms | |
- extensions/serbian | |
- extensions/slovak | |
- extensions/slovenian | |
- extensions/spanish | |
- extensions/swedish | |
- extensions/swiss-german | |
- extensions/turkish | |
- extensions/ukrainian | |
- extensions/vietnamese | |
required: false | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
list_extensions: | |
runs-on: ubuntu-latest | |
outputs: | |
extension_list: ${{ env.EXTENSION_LIST }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.ref }} | |
- name: Inputs | |
env: | |
INPUTS: ${{ toJSON(inputs) }} | |
run: | | |
echo "$INPUTS" | |
- name: Choice | |
env: | |
INPUT_CHOICE: ${{ (inputs.extension && format('["{0}"]', inputs.extension)) }} | |
run: | | |
echo INPUT_CHOICE=$INPUT_CHOICE >> $GITHUB_ENV | |
- name: From Script | |
run: | | |
echo extensions_from_script=$(./scripts/list-extensions.sh) >> $GITHUB_ENV | |
- name: EXTENSION_LIST | |
env: | |
EXTENSION_LIST: ${{ env.INPUT_CHOICE || env.extensions_from_script }} | |
run: | | |
echo EXTENSION_LIST=$EXTENSION_LIST >> $GITHUB_ENV | |
publish: | |
needs: | |
- list_extensions | |
uses: ./.github/workflows/publish.yml | |
with: | |
ref: ${{ inputs.ref }} | |
paths_released: ${{ needs.list_extensions.outputs.extension_list }} | |
secrets: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} | |
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }} | |
# cspell:ignore vsix xargs OVSX |