使用compose-resources代替moko-resources (#6) #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Desktop Distribution | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
release: | |
types: [published] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
checks: write | |
actions: read | |
issues: read | |
packages: write | |
pull-requests: read | |
repository-projects: read | |
statuses: read | |
jobs: | |
build-on-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout my repository | |
uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: 'gradle' | |
- name: Package Distribution | |
run: | | |
./gradlew composeApp:packageDistributionForCurrentOS | |
- name: Upload the Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: distribution | |
path: composeApp/build/compose/binaries/main/exe/* | |
- name: Upload Release Assets | |
if: ${{ github.event_name == 'release' }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: composeApp/build/compose/binaries/main/exe/* | |
build-on-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout my repository | |
uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: 'gradle' | |
- name: Package Distribution | |
run: | | |
./gradlew composeApp:packageDistributionForCurrentOS | |
- name: Upload the Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: distribution | |
path: composeApp/build/compose/binaries/main/dmg/* | |
- name: Upload Release Assets | |
if: ${{ github.event_name == 'release' }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: composeApp/build/compose/binaries/main/dmg/* | |
build-on-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout my repository | |
uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: 'gradle' | |
- name: Install FUSE (linux) | |
uses: ConorMacBride/[email protected] | |
with: | |
apt: libfuse2 | |
- name: Package Distribution | |
run: | | |
./gradlew composeApp:packageDistributionForCurrentOS | |
- name: Upload the Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: distribution | |
path: composeApp/build/appimage/mahjong-utils-app.AppImage | |
- name: Upload Release Assets | |
if: ${{ github.event_name == 'release' }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: composeApp/build/appimage/mahjong-utils-app.AppImage |