-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (48 loc) · 1.76 KB
/
windows.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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Windows package
on:
release:
types: [published]
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up JDK 1.11
uses: actions/setup-java@v2
with:
java-version: 11.0
distribution: zulu
- name: Install (Windows cross compile)
run: |
sudo apt-get update
sudo apt-get install g++-mingw-w64
- name: Apply patch
run: ./scripts/apply_patch.sh
- name: Bundle windows version
run: ./windows/bundle_windows.sh
- name: Upload a Build Artifact (non-release)
uses: actions/upload-artifact@v3
if: ${{ success() && github.event_name != 'release' }}
with:
name: IGV-ScanFold-windows
path: ./build
- name: Upload Release Asset (automatically on release)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./IGV-ScanFold-windows.zip
asset_name: IGV-ScanFold-windows-${{github.event.release.tag_name}}.zip
asset_content_type: application/zip
if: ${{ github.event_name == 'release' }}