-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.72 KB
/
release.yml
File metadata and controls
64 lines (54 loc) · 1.72 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
name: Release
on:
push:
tags:
- "*"
workflow_dispatch:
inputs:
release_tag:
description: Existing git tag to release
required: true
type: string
permissions:
contents: write
jobs:
verify:
uses: ./.github/workflows/reusable-verify.yml
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.release_tag) || github.ref }}
upload_artifacts: false
release:
name: Build and publish release
needs: verify
runs-on: ubuntu-latest
steps:
- name: Checkout release ref
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.release_tag) || github.ref }}
- name: Set up Java 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
cache: gradle
- name: Build release artifacts
run: bash ./gradlew build
- name: Prepare and verify release assets
run: bash scripts/prepare-release-assets.sh build/release-assets
- name: Upload release build artifacts
uses: actions/upload-artifact@v7
with:
name: release-${{ github.run_id }}
if-no-files-found: error
path: |
build/release-assets/*.jar
build/release-assets/SHA256SUMS.txt
- name: Publish GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref_name }}
files: |
build/release-assets/*.jar
build/release-assets/SHA256SUMS.txt
generate_release_notes: true