.github/workflows/publish.yaml #25
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
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
preRelease: | |
description: "Is this a pre-release?" | |
type: boolean | |
required: false | |
default: false | |
dryRun: | |
description: "Is this a dry run?" | |
type: boolean | |
required: false | |
default: false | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
vscode-extension-publish: | |
strategy: | |
matrix: | |
target: [linux-x64, linux-arm64, darwin-x64, darwin-arm64] | |
name: Deploy Extension | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
node-version: lts/* | |
- run: npm ci | |
- uses: "aws-actions/[email protected]" | |
with: | |
role-to-assume: "arn:aws:iam::338683922796:role/semgrep-ide-integration-deploy-role" | |
role-duration-seconds: 900, | |
role-session-name: "semgrep-ide-integration-deploy" | |
aws-region: "us-west-2" | |
- name: download osemgrep pro | |
run: ./download-osemgrep-pro.sh ${{ matrix.target }} | |
- name: Publish to Open VSX Registry | |
uses: HaaLeo/[email protected] | |
id: publishToOpenVSX | |
# Try publishing to Open VSX, but don't fail if it fails | |
# that way we can still publish to the marketplace | |
continue-on-error: true | |
with: | |
# Tied to austin@, lives in 1password, does not expire | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
# release pre-release if that's the event | |
preRelease: ${{github.event.release.prerelease || inputs.preRelease}} | |
dryRun: ${{ inputs.dryRun }} | |
- name: delete package | |
run: rm -rf "${{ steps.publishToOpenVSX.outputs.vsixPath }}" | |
- name: Publish to Visual Studio Marketplace | |
uses: HaaLeo/[email protected] | |
with: | |
# Tied to bence@, lives in 1password expires in may 2024 | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com | |
target: ${{ matrix.target }} | |
# release pre-release if that's the event | |
preRelease: ${{github.event.release.prerelease || inputs.preRelease}} | |
dryRun: ${{ inputs.dryRun }} |