Skip to content

Commit

Permalink
Merge pull request #823 from coq-community/cd-jobs
Browse files Browse the repository at this point in the history
Add options to release action.
  • Loading branch information
rtetley authored Jul 9, 2024
2 parents 93d07e6 + de2da68 commit 1d532ed
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/publish-extension.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
on:
workflow_dispatch:
inputs:
tags:
description: 'Tag to use for release'
preRelease:
description: "Make this a pre-release ?"
required: true
type: boolean
default: true
marketplace:
description: "On which market place should we publish ?"
required: true
type: choice
default: 'both'
options:
- vscode
- openvsx
- both

jobs:
publish-extension:
runs-on: ubuntu-latest
if: success() && startsWith(github.ref, 'refs/tags/')
if: ${{success() && (startsWith(github.ref, 'refs/tags/') || inputs.preRelease)}}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -24,19 +36,21 @@ jobs:
cd client
yarn run package
- name: Publish to Open VSX Registry
if: ${{inputs.marketplace == 'openvsx' || inputs.marketplace == 'both'}}
uses: HaaLeo/publish-vscode-extension@v1.6.2
id: publishToOpenVSX
with:
pat: ${{ secrets.OVSX_PAT }}
packagePath: ./client/
yarn: true
preRelease: false
preRelease: ${{ inputs.preRelease }}
- name: Publish to Visual Studio Marketplace
if: ${{inputs.marketplace == 'vscode' || inputs.marketplace == 'both'}}
uses: HaaLeo/publish-vscode-extension@v1.6.2
with:
pat: ${{ secrets.VSCE_PAT }}
packagePath: ./client/
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
yarn: true
preRelease: false
preRelease: ${{ inputs.preRelease }}

0 comments on commit 1d532ed

Please # to comment.