Publish Extension #7
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
name: Publish Extension | |
on: | |
workflow_dispatch: | |
inputs: | |
preRelease: | |
type: boolean | |
required: true | |
default: false | |
continueOnTagErr: | |
type: boolean | |
required: false | |
default: false | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout repository | |
- uses: jozsefsallai/[email protected] | |
name: get package version as env variable | |
- name: Create a tag | |
continue-on-error: ${{ inputs.continueOnTagErr }} | |
run: | | |
git config user.name = "Github Actions" | |
git config user.email = "[email protected]" | |
git tag -a v${{ env.PACKAGE_VERSION }} -m "Version ${{ env.PACKAGE_VERSION }}" | |
git push origin v${{ env.PACKAGE_VERSION }} | |
- name: Generate Files | |
run: | | |
npm i | |
npm run build | |
- name: Publish to Visual Studio Marketplace | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.AZURE_PAT }} | |
registryUrl: https://marketplace.visualstudio.com | |
preRelease: ${{ inputs.preRelease }} |