-
Notifications
You must be signed in to change notification settings - Fork 10
78 lines (76 loc) · 2.68 KB
/
release.yml
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
on:
push:
branches:
- master
env:
JAVA_DISTRIBUTION: zulu
JAVA_VERSION: 22.0.1+8
GRADLE_OPTS: -Dorg.gradle.daemon=false
jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Build
run: ./gradlew distZip --info
- name: Extract Release Variables
id: extract_release_variables
shell: bash
run: |
echo "tag_name=$(find build/distributions/ControllerBuddy-*.zip -maxdepth 1 -print0 | xargs -0 -I filename basename -s .zip filename | sed s/-windows-x86-64//)" >> $GITHUB_OUTPUT
echo "archive_path=$(find build/distributions/ControllerBuddy-*.zip -maxdepth 1 -print0)" >> $GITHUB_OUTPUT
- name: Tag Commit
uses: tvdias/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.extract_release_variables.outputs.tag_name }}
- name: Release
id: release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.extract_release_variables.outputs.tag_name }}
draft: false
prerelease: false
files: ${{ steps.extract_release_variables.outputs.archive_path }}
linux:
needs: windows
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Build
run: ./gradlew distTar --info
- name: Extract Release Variables
id: extract_release_variables
shell: bash
run: |
echo "tag_name=$(find build/distributions/ControllerBuddy-*.tgz -maxdepth 1 -print0 | xargs -0 -I filename basename -s .tgz filename | sed s/-linux-x86-64//)" >> $GITHUB_OUTPUT
echo "archive_path=$(find build/distributions/ControllerBuddy-*.tgz -maxdepth 1 -print0)" >> $GITHUB_OUTPUT
- name: Release
id: release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.extract_release_variables.outputs.tag_name }}
draft: false
prerelease: false
generate_release_notes: true
files: ${{ steps.extract_release_variables.outputs.archive_path }}