forked from CulverLab/sparcd
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.4 KB
/
tagged-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
name: "tagged-release"
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
gh_tagged_release:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest, macOS-14]
runs-on: ${{ matrix.platform }}
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: 21
- name: Build with Maven
run: cd "Sanimal FX" && mvn -U compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../sparcd-${{ matrix.platform }}.jar
- name: set date env var
if: ${{ matrix.platform != 'windows-latest' }}
run: echo "NOW=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: set date env var (Windows)
if: ${{ matrix.platform == 'windows-latest' }}
run: $NOW=& Get-Date -format yyyy.MM.dd; echo "NOW=$NOW" >> $env:GITHUB_ENV
- name: Upload release assets
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release Build ${{ env.NOW }}
files: sparcd-${{ matrix.platform }}.jar
draft: false
prerelease: false
fail_on_unmatched_files: true
tag_name: Release-Build-${{ env.NOW }}
make_latest: true