forked from Bios-Marcel/baka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github build and release workflow
- Loading branch information
1 parent
e43572d
commit fffcba3
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build | ||
|
||
on: push | ||
|
||
jobs: | ||
test-and-build: | ||
strategy: | ||
matrix: | ||
include: | ||
- platform: windows-latest | ||
binary_name: Baka-*.exe | ||
output_name: Baka.exe | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '22' | ||
distribution: 'adopt' | ||
|
||
- name: Build artifact | ||
shell: bash | ||
run: | | ||
./mvnw compile javafx:jlink jpackage:jpackage | ||
- name: Upload build artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.output_name }} | ||
path: ./target/dist/${{ matrix.binary_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish release | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Build] | ||
branches: [v**] | ||
types: [completed] | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
# Kinda bad since it might release on any branch starting with v, but it'll do for now. | ||
# Tag filtering in "on:" doesn't work, since the inital build trigger gets lost. | ||
# github.ref is therefore also being reset to "refs/head/master". | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
steps: | ||
- name: Download windows artifact | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
workflow: build.yml | ||
name: Baka.exe | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: ${{ github.event.workflow_run.head_branch }} | ||
tag_name: ${{ github.event.workflow_run.head_branch }} | ||
files: | | ||
Baka.exe |