Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 35 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,29 @@ on:
- released

jobs:
publish:
setup:
runs-on: ubuntu-latest
outputs:
is_new_release: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Check Tag ref
id: check_tag_ref
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "IS_NEW_RELEASE=true" >> $GITHUB_OUTPUT
fi
- name: Publish
if: ${{ steps.check_tag_ref.outputs.IS_NEW_RELEASE == 'true' }}
publishToVSMarket:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Publish to Visual Studio Marketplace
if: ${{ needs.setup.outputs.is_new_release == 'true' }}
run: |
npm install
npm install --global @vscode/vsce
Expand All @@ -33,3 +39,23 @@ jobs:
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
VSCE_PAT: ${{ secrets.VSCE_PAT }}
publishToOpenVSX:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Publish to Open VSX Registry
if: ${{ needs.setup.outputs.is_new_release == 'true' }}
run: |
npm install
npm install --global ovsx
ovsx publish
env:
# To help protect secrets, we set VSCE_PAT as an environemnt variables.
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
OVSX_PAT: ${{ secrets.OVSX_PAT }}