|
8 | 8 | - released |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - publish: |
| 11 | + setup: |
12 | 12 | runs-on: ubuntu-latest |
| 13 | + outputs: |
| 14 | + is_new_release: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE }} |
13 | 15 | steps: |
14 | | - - name: Checkout |
15 | | - uses: actions/checkout@v3 |
16 | | - - name: Install Node.js |
17 | | - uses: actions/setup-node@v3 |
18 | | - with: |
19 | | - node-version: 16.x |
20 | 16 | - name: Check Tag ref |
21 | 17 | id: check_tag_ref |
22 | 18 | run: | |
23 | 19 | if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then |
24 | 20 | echo "IS_NEW_RELEASE=true" >> $GITHUB_OUTPUT |
25 | 21 | fi |
26 | | - - name: Publish |
27 | | - if: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE == 'true' }} |
| 22 | + publishToVSMarket: |
| 23 | + runs-on: ubuntu-latest |
| 24 | + needs: setup |
| 25 | + steps: |
| 26 | + - name: Checkout |
| 27 | + uses: actions/checkout@v3 |
| 28 | + - name: Install Node.js |
| 29 | + uses: actions/setup-node@v3 |
| 30 | + with: |
| 31 | + node-version: 16.x |
| 32 | + - name: Publish to Visual Studio Marketplace |
| 33 | + if: ${{ needs.setup.outputs.is_new_release == 'true' }} |
28 | 34 | run: | |
29 | 35 | npm install |
30 | 36 | npm install --global @vscode/vsce |
|
33 | 39 | # To help protect secrets, we set VSCE_PAT as an environemnt variables. |
34 | 40 | # https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow |
35 | 41 | VSCE_PAT: ${{ secrets.VSCE_PAT }} |
| 42 | + publishToOpenVSX: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + needs: setup |
| 45 | + steps: |
| 46 | + - name: Checkout |
| 47 | + uses: actions/checkout@v3 |
| 48 | + - name: Install Node.js |
| 49 | + uses: actions/setup-node@v3 |
| 50 | + with: |
| 51 | + node-version: 16.x |
| 52 | + - name: Publish to Open VSX Registry |
| 53 | + if: ${{ needs.setup.outputs.is_new_release == 'true' }} |
| 54 | + run: | |
| 55 | + npm install |
| 56 | + npm install --global ovsx |
| 57 | + ovsx publish |
| 58 | + env: |
| 59 | + # To help protect secrets, we set VSCE_PAT as an environemnt variables. |
| 60 | + # https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow |
| 61 | + OVSX_PAT: ${{ secrets.OVSX_PAT }} |
0 commit comments