Repository navigation
79 lines (71 loc) · 2.41 KB
/
Copy pathrelease.yml
File metadata and controls
79 lines (71 loc) · 2.41 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
71
72
73
74
75
76
77
78
79
name: release
# runs when a tag v* is pushed
# releases the extension to GitHub and the vscode marketplace
on:
push:
tags:
- "v*"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
check-version:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: Check stable version and release tag
env:
RELEASE_TAG: ${{ github.ref_name }}
run: node .github/scripts/extension-version.js check-stable "$RELEASE_TAG"
verify:
needs: check-version
uses: ./.github/workflows/main.yml
release:
name: Release
needs: verify
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode-R.vsix
path: artifacts/
- name: Create release
run: |
VERSION=${GITHUB_REF#refs/tags/v}
mv artifacts/vscode-R.vsix "artifacts/r-$VERSION.vsix"
gh release create "v$VERSION" "artifacts/r-$VERSION.vsix" \
--title "v$VERSION" \
--notes "Release v$VERSION" \
--generate-notes
publish:
name: Publish
timeout-minutes: 30
runs-on: ubuntu-latest
needs:
- verify
- release
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode-R.vsix
path: artifacts/
- name: Publish to Visual Studio Marketplace
run: pnpm exec vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath artifacts/*.vsix
- name: Publish to Open VSX Registry
run: pnpm exec ovsx publish -p ${{ secrets.OPEN_VSX_TOKEN }} --packagePath artifacts/*.vsix