generated from AdamRaichu/vscode-webext-template
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (61 loc) · 1.8 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Publish Extension
on:
workflow_dispatch:
inputs:
preRelease:
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
- 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
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}