Skip to content

Commit f655b6e

Browse files
authored
Update GitHub Actions workflow for builds and releases
Fix indentation, which is significant in yaml
1 parent e970ae6 commit f655b6e

1 file changed

Lines changed: 22 additions & 21 deletions

File tree

.github/workflows/build.yaml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Build Native Installers
33
on:
44
push:
55
branches: [ "main" ]
6+
tags: [ "v*" ] # This ensures the workflow triggers when you push a tag
67
pull_request:
78
branches: [ "main" ]
89

@@ -11,7 +12,7 @@ jobs:
1112
name: Build on ${{ matrix.os }}
1213
runs-on: ${{ matrix.os }}
1314
strategy:
14-
fail-fast: false # This prevents the Mac build from stopping if Linux fails
15+
fail-fast: false
1516
matrix:
1617
os: [macos-latest, ubuntu-latest]
1718

@@ -20,11 +21,10 @@ jobs:
2021
uses: actions/checkout@v4
2122

2223
- name: Set up JDK 25
23-
uses: actions/setup-java@v4
24+
uses: uses: actions/setup-java@v4
2425
with:
2526
java-version: '25'
2627
distribution: 'oracle'
27-
# Removed the 'cache: ant' line to fix the error
2828

2929
- name: Install Linux Dependencies
3030
if: runner.os == 'Linux'
@@ -39,26 +39,27 @@ jobs:
3939
uses: actions/upload-artifact@v4
4040
with:
4141
name: ${{ matrix.os }}-installer
42-
path: dist/*
42+
path: dist/
4343

44-
release:
45-
name: Create GitHub Release
46-
needs: build # Only runs if both builds finish successfully
47-
if: startsWith(github.ref, 'refs/tags/') # Only runs on tag pushes
48-
runs-on: ubuntu-latest
49-
steps:
50-
- name: Download all artifacts
51-
uses: actions/download-artifact@v4
52-
with:
44+
# This must be aligned exactly with "build:"
45+
release:
46+
name: Create GitHub Release
47+
needs: build
48+
if: startsWith(github.ref, 'refs/tags/')
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Download all artifacts
52+
uses: actions/download-artifact@v4
53+
with:
5354
path: artifacts
5455
merge-multiple: true
5556

56-
- name: Create Release
57-
uses: softprops/action-gh-release@v2
58-
with:
59-
files: |
60-
artifacts/*.dmg
57+
- name: Create Release
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
files: |
61+
artifacts/*.dmg
6162
artifacts/*.deb
62-
body: "Automatic build of ${{ github.ref_name }}"
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
body: "Automatic build of ${{ github.ref_name }}"
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)