Skip to content

Pre-release VSIX

Pre-release VSIX #361

Workflow file for this run

name: Pre-release VSIX
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
jobs:
package-vsix:
strategy:
matrix:
include:
- os: windows-latest
platform: win
arch: x64
target: win32-x64
- os: ubuntu-latest
platform: linux
arch: x64
target: linux-x64
- os: macos-latest
platform: mac
arch: x64
target: darwin-x64
- os: macos-latest
platform: mac
arch: arm64
target: darwin-arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SOURCERY_RELEASE_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: latest
- run: yarn install --frozen-lockfile
- name: Update binaries
run: |
./download-binaries.sh ${{ github.event.inputs.version }}
mkdir -p sourcery_binaries/install
rm -rf sourcery_binaries/install/*
mv downloaded_binaries/${{matrix.platform}}-${{matrix.arch}} sourcery_binaries/install/${{matrix.platform}}
- name: Package VSCode extension
run: yarn run vsce package --target ${{matrix.target}}
- name: Rename packaged VSIX file
run: mv sourcery-*.vsix sourcery-${{ github.event.inputs.version }}-${{ matrix.target }}.vsix
- name: Upload archive
uses: actions/upload-artifact@v4
with:
path: '*.vsix'
name: sourcery-${{ github.event.inputs.version }}-${{ matrix.target }}
release:
needs: package-vsix
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: artifacts
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: v${{ github.event.inputs.version }}
name: Sourcery ${{ github.event.inputs.version }}
body: v${{ github.event.inputs.version }}
prerelease: true
artifacts: 'artifacts/*.vsix'
artifactContentType: raw
artifactErrorsFailBuild: true
token: ${{ secrets.SOURCERY_RELEASE_TOKEN }}
- name: Notify Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: Publish VS Code extension pre-release v${{ github.event.inputs.version }} - ${{ job.status }}
fields: repo,commit,workflow,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASES_WEBHOOK_URL }}
if: always()