-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (65 loc) · 2.29 KB
/
Copy pathrelease.yml
File metadata and controls
70 lines (65 loc) · 2.29 KB
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
62
63
64
65
66
67
68
69
70
name: Release
on:
push:
branches: [main]
workflow_dispatch: {}
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
release:
name: Package and Upload
needs: [release-please]
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
steps:
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
ref: ${{ needs.release-please.outputs.tag_name }}
- uses: ./.github/actions/setup-node
- run: npm run check
- run: npx @vscode/vsce package --out patchloom.vsix
- name: Upload .vsix to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "${{ needs.release-please.outputs.tag_name }}" patchloom.vsix
# See ~/.grok/skills/vsce-publish/SKILL.md (or /vsce-publish) for the full
# one-time browser setup (aex.dev.azure.com, PAT scopes, Open VSX agreement
# + create-namespace + ownership claim), secret names, and troubleshooting.
- name: Publish to VS Code Marketplace
if: env.VSCE_PAT != ''
run: npx @vscode/vsce publish --packagePath patchloom.vsix
- name: Publish to Open VSX
if: env.OVSX_PAT != ''
run: npx ovsx publish patchloom.vsix