2.8.0 #33
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
github-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Parse pre-release flag for vsce | |
id: vsce-prerelease | |
run: echo "prerelease=$(cat package.json | jq '.vsce.preRelease')" >> $GITHUB_OUTPUT | |
- uses: marp-team/actions@v1 | |
with: | |
task: release | |
token: ${{ secrets.GITHUB_TOKEN }} | |
preRelease: ${{ steps.vsce-prerelease.outputs.prerelease == 'true' }} | |
upload-vsix: | |
needs: github-release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- run: npm ci | |
- run: npm run package | |
- name: Find out created VSIX | |
id: vsix | |
run: echo "name=$(find . -maxdepth 1 -name '*.vsix' -printf '%f\n' | head -n 1)" >> $GITHUB_OUTPUT | |
- name: Upload VSIX to GitHub Release | |
uses: marp-team/actions@v1 | |
with: | |
task: upload | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: ${{ steps.vsix.outputs.name }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: vsix | |
path: ${{ steps.vsix.outputs.name }} | |
publish-to-open-vsx: | |
needs: upload-vsix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Parse pre-release flag for vsce | |
id: vsce-prerelease | |
run: echo "prerelease=$(cat package.json | jq '.vsce.preRelease')" >> $GITHUB_OUTPUT | |
- uses: actions/download-artifact@v3 | |
with: | |
name: vsix | |
path: ~/vsix | |
- name: Find out downloaded VSIX | |
id: vsix | |
run: echo "path=$(find ~/vsix -maxdepth 1 -name '*.vsix' -printf '%p\n' | head -n 1)" >> $GITHUB_OUTPUT | |
- name: Publish to Open VSX Registry | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.OPEN_VSX_PAT }} | |
extensionFile: ${{ steps.vsix.outputs.path }} | |
packagePath: '' | |
preRelease: ${{ steps.vsce-prerelease.outputs.prerelease == 'true' }} | |
# Workaround: Uploading to Open VSX takes a long minutes, and does not respond even if uploaded successfully :( | |
timeout-minutes: 30 | |
continue-on-error: true |