Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gradle build commands and add some metadata, add macOS and Windows CI builds. #3

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 124 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ on:
push:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.github/workflows/nightly.yml'
pull_request:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.github/workflows/nightly.yml'
workflow_dispatch:
inputs:
version:
Expand All @@ -29,8 +33,8 @@ jobs:
- name: Move nightly tag to head for nightly release
run: git tag -f nightly && git push origin nightly -f

build-nightly-artifact:
name: Nightly Artifact Build
build-linux-nightly-artifact:
name: Nightly Artifact Linux Build
runs-on: ubuntu-20.04
needs: [update-nightly-tag]
if: |
Expand Down Expand Up @@ -75,7 +79,7 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp -v ./build/compose/binaries/main/deb/trifa-material_*_amd64.deb trifa-material_nightly.deb
- name: Upload appimage
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: trifa-material_nightly.deb
Expand All @@ -93,3 +97,120 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material_nightly.deb"


build-macos-nightly-artifact:
name: Nightly Artifact macOS Build
runs-on: macos-11
needs: update-nightly-tag
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- name: install cliclick
run: brew install cliclick

- name: install deps
run: brew install git

- name: test java1
run: |
type java
java -version || exit 0
/usr/libexec/java_home -V
/usr/libexec/java_home -v 17
export JAVA_HOME=$(/usr/libexec/java_home -v17)
java -version
$JAVA_HOME/bin/java -version
$JAVA_HOME/bin/javac -version
ls -al /usr/local/Cellar/openjdk/

- name: build package
run: |
ls -al
id
pwd
export JAVA_HOME=$(/usr/libexec/java_home -v17)
./gradlew packageDistributionForCurrentOS

- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp -v /Users/runner/work/trifa_material/trifa_material/build/compose/binaries/main/dmg/trifa_material-*.dmg trifa-material_nightly.dmg
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: trifa-material_nightly.dmg
path: trifa-material_nightly.dmg
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material_nightly.dmg"



build-windows-nightly-artifact:
name: Nightly Artifact Windows Build
runs-on: windows-latest
needs: update-nightly-tag
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'

- name: test java1
shell: bash
run: |
java -version

- name: build package
shell: bash
run: |
ls -al || echo "_"
id || echo "_"
pwd || echo "_"
./gradlew packageDistributionForCurrentOS

- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp -v ./build/compose/binaries/main/msi/trifa*material*.msi trifa-material_nightly.msi
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: trifa-material_nightly.msi
path: trifa-material_nightly.msi
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material_nightly.msi"


17 changes: 14 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ dependencies {
}

compose.desktop {
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

kotlin {
jvmToolchain(17)
}

application {
mainClass = "com.zoffcc.applications.trifa.MainKt"
// jvmArgs += listOf("-Xmx2G")
Expand All @@ -33,10 +43,10 @@ compose.desktop {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "trifa_material"
packageVersion = "1.0.0"
// description = "Compose Example App"
description = "TRIfA Material App"
copyright = "© 2023 Zoff. All rights reserved."
// vendor = "Example vendor"
// licenseFile.set(project.file("LICENSE.txt"))
vendor = "Zoxcore"
licenseFile.set(project.file("LICENSE"))
appResourcesRootDir.set(project.layout.projectDirectory.dir("resources"))

val iconsRoot = project.file("resources")
Expand All @@ -56,3 +66,4 @@ compose.desktop {
}
}
}

Loading