-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (67 loc) · 2.09 KB
/
Copy pathrelease.yml
File metadata and controls
78 lines (67 loc) · 2.09 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
name: release
# Cut a GitHub Release when a version tag is pushed.
# Artifacts match scripts/release/build-artifacts.sh (source, JAR, frontend,
# MCP pack, SBOMs, checksums, manifest).
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
build-and-publish:
name: build artifacts + GitHub Release
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-java@v5.6.0
with:
distribution: temurin
java-version: '25'
cache: maven
- uses: actions/setup-node@v7
with:
node-version: '22'
cache: npm
- name: Build release artifacts
run: |
chmod +x scripts/release/build-artifacts.sh
./scripts/release/build-artifacts.sh "${GITHUB_REF_NAME}"
- name: Verify checksums
run: |
cd "release-artifacts/${GITHUB_REF_NAME}"
sha256sum -c SHA256SUMS
sha512sum -c SHA512SUMS
- name: Upload workflow artifacts
uses: actions/upload-artifact@v4
with:
name: deepsql-${{ github.ref_name }}
path: release-artifacts/${{ github.ref_name }}/
if-no-files-found: error
retention-days: 30
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
TAG="${GITHUB_REF_NAME}"
NOTES="docs/releases/RELEASE_NOTES-${TAG}.md"
if [[ ! -f "$NOTES" ]]; then
NOTES="CHANGELOG.md"
fi
# Idempotent: if the release already exists (re-run), upload assets only.
if gh release view "$TAG" >/dev/null 2>&1; then
gh release upload "$TAG" "release-artifacts/${TAG}"/* --clobber
else
gh release create "$TAG" \
--title "DeepSQL ${TAG}" \
--notes-file "$NOTES" \
--verify-tag \
"release-artifacts/${TAG}"/*
fi