Skip to content

v0.2.8

v0.2.8 #36

Workflow file for this run

# refer to the github docs for more information https://github.com/github/vscode-github-actions/blob/main/.github/workflows/publish.yml
# Releases the plugin to GitHub and VS Code Marketplace
name: Release
on:
release:
types: [released]
jobs:
package:
name: Package
uses: ./.github/workflows/package.yml
secrets: inherit
with:
version: ${{ github.event.release.tag_name }}
release:
name: Release
runs-on: ubuntu-latest
needs: package
environment: prod
steps:
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v4
- name: Download VSIX artifact
uses: actions/download-artifact@v4
with:
name: scorpio-${{ github.event.release.tag_name }}.vsix
path: .
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
registry-url: "https://npm.pkg.github.com"
- name: Install CI
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Strip v from version
id: strip-v
shell: bash
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_OUTPUT
# release to VS Code Marketplace
- name: Publish Plugin
run: npx vsce publish --packagePath ./artemis-scorpio-${{ steps.strip-v.outputs.VERSION }}.vsix -p ${{ secrets.PUBLISH_TOKEN }}
- name: Publish to VSX Registry
id: vsx-publish
run: |
npx ovsx publish -p ${{ secrets.PUBLISH_VSX }} ./artemis-scorpio-${{ steps.strip-v.outputs.VERSION }}.vsix
# Upload artifact as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./artemis-scorpio-${{ steps.strip-v.outputs.VERSION }}.vsix#scorpio-${{ github.event.release.tag_name }}.vsix
# personal access token with metadata:r actions:rw contents:rw
- name: Trigger Theia Build
if: steps.vsx-publish.outcome == 'success'
continue-on-error: true
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.THEIA_BLUEPRINT_TOKEN }}" \
${{ vars.THEIA_BLUEPRINT_URL}}/dispatches \
-d '{"event_type":"release_event","client_payload":{"version": "${{ steps.strip-v.outputs.VERSION }}"}}'