-
Notifications
You must be signed in to change notification settings - Fork 26
59 lines (49 loc) · 1.63 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
name: Publish to Marketplace
on:
release:
types: [published]
permissions:
# read is not enought for editing releases
contents: write
deployments: write
packages: write
jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Node v18.15.x
uses: actions/setup-node@v3
with:
node-version: '18.15.x'
registry-url: "https://npm.pkg.github.com"
scope: "@paulober"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python v3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install NPM dependencies And Download Stubs
shell: bash
run: |
sed -i '1i//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}' .npmrc
npm ci --no-audit
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: ./scripts/publish.sh
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Visual Studio Code extension package
path: pico-w-go-*.vsix
- name: Upload Artifact To Release
#gh api --method POST -H "Accept: application/vnd.github+json" /repos/paulober/Pico-W-Go/releases/$RELEASE_ID/assets
run: gh release upload $RELEASE_TAG_NAME pico-w-go-*.vsix
env:
#RELEASE_ID: ${{ github.event.release.id }}
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}