generated from AdamRaichu/vscode-webext-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
33 additions
and
57 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,27 +6,56 @@ on: | |
type: boolean | ||
required: true | ||
default: false | ||
continueOnTagErr: | ||
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: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout repository | ||
- uses: jozsefsallai/node-package-version@v1 | ||
name: Get package version as env variable | ||
- name: Create a tag | ||
- 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 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 }} |