Skip to content

Commit f5f8c17

Browse files
committed
Upload desktop binaries as Github Release assets
1 parent 583b9b1 commit f5f8c17

File tree

3 files changed

+37
-36
lines changed

3 files changed

+37
-36
lines changed

.github/workflows/desktop_distribution.yml

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ on:
1111

1212
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1313
permissions:
14-
contents: read
14+
# Needed for reading repository contents (read)
15+
# and uploading assets to Github Releases (write)
16+
contents: write
17+
# Needed for deploying to GitHub Pages
1518
pages: write
19+
# Needed for getting the OIDC token for the Github Pages deployment
20+
# See https://github.com/actions/deploy-pages?tab=readme-ov-file#oidc
1621
id-token: write
1722

1823
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
@@ -25,54 +30,56 @@ jobs:
2530
# Single deploy job since we're just deploying
2631
conveyor:
2732
name: "Create desktop distributions"
28-
environment: production
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
2936
runs-on: ubuntu-22.04
3037
env:
3138
CONVEYOR_AGREE_TO_LICENSE: "1"
3239
APP_VERSION: ${{ github.ref_name }}
3340
steps:
34-
- uses: actions/checkout@v2
35-
- uses: actions/setup-java@v3
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Set up Java
45+
uses: actions/setup-java@v3
3646
with:
3747
distribution: 'temurin'
3848
java-version: '17'
39-
- name: Setup Gradle
49+
50+
- name: Set up Gradle
4051
uses: gradle/actions/setup-gradle@v3
4152

42-
- run: ./gradlew jvmJar
53+
- name: Build JAR
54+
run: ./gradlew jvmJar
4355

44-
- uses: hydraulic-software/conveyor/actions/[email protected]
56+
- name: Build desktop distributions
57+
uses: hydraulic-software/conveyor/actions/[email protected]
4558
with:
4659
command: make site
4760
signing_key: ${{ secrets.SIGNING_KEY }}
4861
agree_to_license: 1
4962
cache_key: conveyor-${{ matrix.os }}-${{ matrix.arch }}
5063

51-
- uses: actions/upload-artifact@v4
52-
with:
53-
name: download-page
54-
path: output
55-
retention-days: 1
64+
- name: Extract download page files from output
65+
run: |
66+
mkdir -p pages_output/download
67+
mv output/download.html pages_output/download/index.html
68+
mv output/icon.png pages_output/download
69+
70+
- name: Upload artifacts to Github Release
71+
env:
72+
GH_TOKEN: ${{ github.token }}
73+
run: gh release upload "$GITHUB_REF_NAME" output/* --clobber
5674

57-
deploy:
58-
environment:
59-
name: github-pages
60-
url: ${{ steps.deployment.outputs.page_url }}
61-
runs-on: ubuntu-latest
62-
needs: [conveyor]
63-
steps:
64-
- name: Download a single artifact
65-
uses: actions/download-artifact@v4
66-
with:
67-
name: download-page
68-
path: download
69-
- run: mv download/download.html download/index.html
7075
- name: Setup Pages
7176
uses: actions/configure-pages@v3
77+
7278
- name: Upload artifact
73-
uses: actions/upload-pages-artifact@v1
79+
uses: actions/upload-pages-artifact@v3
7480
with:
75-
path: '.'
81+
path: pages_output
82+
7683
- name: Deploy to GitHub Pages
7784
id: deployment
78-
uses: actions/deploy-pages@v2
85+
uses: actions/deploy-pages@v4

conveyor.conf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ app {
1515
display-name = "WFRP Master"
1616
license = "GPL-3"
1717
rdns-name = "cz.frantisekmasa.wfrp-master"
18-
vcs-url = "https://github.com/fmasa/wfrp-master"
18+
vcs-url = "github.com/fmasa/wfrp-master"
1919
icons = "app/src/main/res/mipmap-xxxhdpi/ic_launcher.png"
20-
21-
site {
22-
base-url = "https://fmasa.github.io/wfrp-master/download"
23-
}
2420
}
2521

2622
conveyor.compatibility-level = 17

desktop/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ compose.desktop {
5454
packageVersion = System.getenv("APP_VERSION") ?: "1.0.0"
5555

5656
windows {
57-
menuGroup = "Compose Examples"
58-
// see https://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html
59-
upgradeUuid = "BF9CDA6A-1391-46D5-9ED5-383D6E68CCEB"
57+
upgradeUuid = "F73A74E2-BF36-4883-B4AE-ABC289D0816C"
6058
}
6159

6260
nativeDistributions {

0 commit comments

Comments
 (0)