-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.48 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
name: Publish
on:
release:
types: # https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#release
- released
jobs:
main:
runs-on: windows-latest
steps:
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- name: Download Assets
uses: i3h/[email protected]
with:
owner: ${{ github.event.repository.owner.login }}
repo: ${{ github.event.repository.name }}
tag: ${{ github.event.release.tag_name }}
file: Gardiner.XsltTools.vsix
token: ${{ secrets.GITHUB_TOKEN }}
# - run: dir -recurse
- name: Script
run: |
# Find VsixPublisher
$Installation = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -format json | ConvertFrom-Json
$Path = $Installation.installationPath
Write-Host $Path
$VsixPublisher = Join-Path -Path $Path -ChildPath "VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" -Resolve
& $VsixPublisher publish -payload "Gardiner.XsltTools.vsix" -publishManifest ".\build\extension-manifest.json" -personalAccessToken $env:PersonalAccessToken -ignoreWarnings "VSIXValidatorWarning01,VSIXValidatorWarning02,VSIXValidatorWarning08"
env:
PersonalAccessToken: ${{ secrets.PersonalAccessToken }}