Skip to content

Commit 17506c3

Browse files
committed
ci(release): add Release Dry Run workflow (manual): builds, packages, uploads artifact, creates draft release
1 parent 3f21ce3 commit 17506c3

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Release Dry Run
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
dryrun:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v5
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v5
18+
with:
19+
node-version: 24
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build dist
25+
run: npm run package
26+
27+
- name: Package VSIX
28+
run: npx --yes @vscode/vsce package
29+
30+
- name: Compute names
31+
id: vars
32+
run: |
33+
NAME=$(node -p "require('./package.json').name")
34+
VERSION=$(node -p "require('./package.json').version")
35+
FILE="$NAME-$VERSION.vsix"
36+
TAG="autopathcomment-${VERSION}-dryrun-${GITHUB_RUN_NUMBER}"
37+
echo "file=$FILE" >> "$GITHUB_OUTPUT"
38+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
39+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
40+
41+
- name: Upload VSIX artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: ${{ steps.vars.outputs.file }}
45+
path: ${{ steps.vars.outputs.file }}
46+
47+
- name: Create draft GitHub Release (dry-run)
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
draft: true
51+
tag_name: ${{ steps.vars.outputs.tag }}
52+
name: ${{ steps.vars.outputs.tag }}
53+
generate_release_notes: true
54+
files: ${{ steps.vars.outputs.file }}
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+

0 commit comments

Comments
 (0)