📢 Manual Publish #59
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: | |
- none | |
- all | |
- extensions/ancient-greek | |
- extensions/arabic | |
- extensions/australian-english | |
- extensions/austrian-german | |
- extensions/basque | |
- extensions/british-english | |
- extensions/bulgarian | |
- extensions/canadian-english | |
- extensions/catalan | |
- extensions/croatian | |
- extensions/cspell-bundled-dictionaries | |
- extensions/czech | |
- extensions/danish | |
- extensions/dutch | |
- extensions/esperanto | |
- extensions/estonian | |
- extensions/finnish | |
- extensions/french | |
- extensions/french-reforme | |
- extensions/german | |
- extensions/greek | |
- extensions/hebrew | |
- extensions/hungarian | |
- extensions/hunspell-syntax | |
- extensions/indonesian | |
- extensions/italian | |
- extensions/latin | |
- extensions/latvian | |
- extensions/lithuanian | |
- extensions/medical-terms | |
- extensions/norwegian-bokmal | |
- extensions/persian | |
- extensions/polish | |
- extensions/portuguese | |
- extensions/portuguese-brazilian | |
- extensions/romanian | |
- extensions/russian | |
- extensions/scientific-terms | |
- extensions/serbian | |
- extensions/slovak | |
- extensions/slovenian | |
- extensions/spanish | |
- extensions/swedish | |
- extensions/swiss-german | |
- extensions/turkish | |
- extensions/ukrainian | |
- extensions/vietnamese | |
- extensions/win32 | |
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@v4 | |
with: | |
ref: ${{ inputs.ref }} | |
- name: Inputs | |
env: | |
INPUTS: ${{ toJSON(inputs) }} | |
run: | | |
echo "$INPUTS" | |
- name: Choice | |
env: | |
INPUT_CHOICE: ${{ (inputs.extension && (inputs.extension != 'all') && 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 }} | |
if: ${{ inputs.extension != 'none' }} | |
secrets: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} | |
OVSX_TOKEN: ${{ secrets.OVSX_TOKEN }} | |
# cspell:ignore vsix xargs OVSX |