Skip to content

Commit

Permalink
Build app and upload artifacts when commit message contains #build
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman committed Oct 6, 2024
1 parent 02d396d commit 699af25
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: push
jobs:
publish:
runs-on: ${{ matrix.os }}
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.head_commit.message, '#build') }}
permissions:
contents: write

Expand Down Expand Up @@ -50,8 +50,8 @@ jobs:

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: true
#release: ${{ startsWith(github.ref, 'refs/tags/v') }}
#release: true
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
# macOS notarization API key
APPLE_API_KEY: ~/private_keys/AuthKey.p8
Expand All @@ -61,3 +61,26 @@ jobs:
#- name: Print notarization-error.log
# run: cat notarization-error.log

- name: Upload Linux artifact
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v3
with:
name: heynote-linux-${{ github.sha }}
path: release/*/Heynote_*.AppImage
retention-days: 30

- name: Upload Mac artifact
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v3
with:
name: heynote-mac-universal-${{ github.sha }}
path: release/*/mac-universal/Heynote.app
retention-days: 30

- name: Upload Windows artifact
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v3
with:
name: heynote-windows-${{ github.sha }}
path: release/*/Heynote_*.exe
retention-days: 30

0 comments on commit 699af25

Please sign in to comment.