Skip to content

Commit

Permalink
update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamRaichu authored Oct 20, 2023
1 parent 4def97e commit fc19b1f
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,52 @@ on:
type: boolean
required: false
default: false
workflow_call:
secrets:
AZURE_PAT:
required: true
description: The PAT to use to publish the extension.
inputs:
preRelease:
type: boolean
required: true
default: false
continueOnTagErr:
type: boolean
required: false
default: false
permissions:
contents: write
jobs:
build:
permissions:
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
name: Checkout repository
- name: Configure git
run: |
git config user.name = "Github Actions"
git config user.email = "[email protected]"
git pull
- 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 Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
id: publishToOpenVSX
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- 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 }}
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}

0 comments on commit fc19b1f

Please sign in to comment.