.github/workflows/publish.yaml #19
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 | |
with: | |
# Tied to austin@, lives in 1password, does not expire | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
target: ${{ matrix.target }} # only for specific platforms | |
# release pre-release if that's the event | |
preRelease: ${{github.event.release.prerelease || inputs.preRelease}} | |
dryRun: ${{ inputs.dryRun }} | |
- 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 | |
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} | |
target: ${{ matrix.target }} | |
# release pre-release if that's the event | |
preRelease: ${{github.event.release.prerelease || inputs.preRelease}} | |
dryRun: ${{ inputs.dryRun }} |