-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (51 loc) · 1.66 KB
/
release.yml
File metadata and controls
65 lines (51 loc) · 1.66 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
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check Version
run: |
$tag = $env:GITHUB_REF -replace 'refs/tags/v', ''
$pkg = Get-Content package.json | ConvertFrom-Json
if ($pkg.version -ne $tag) {
Write-Error "Version mismatch: Tag $tag vs Package $($pkg.version)"
exit 1
}
- name: Build
run: npm run build
- name: Package (SEA)
run: npm run package
- name: Install Inno Setup
run: choco install innosetup -y --no-progress
- name: Build Installer
run: npm run installer
- name: Generate Docs
run: npm run docs:generate
- name: Stage Artifacts
run: npm run stage
- name: Verify Artifacts
run: |
if (-not (Test-Path artifacts/cloudsqlctl.exe)) { throw "Missing cloudsqlctl.exe" }
if (-not (Test-Path artifacts/cloudsqlctl-setup.exe)) { throw "Missing cloudsqlctl-setup.exe" }
if (-not (Test-Path artifacts/cloudsqlctl-windows-x64.zip)) { throw "Missing zip bundle" }
if (-not (Test-Path artifacts/SHA256SUMS.txt)) { throw "Missing SHA256SUMS.txt" }
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: artifacts/*
generate_release_notes: true