-
-
Notifications
You must be signed in to change notification settings - Fork 42
108 lines (100 loc) · 3.24 KB
/
manual-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# 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