Skip to content

refactor: Update artifact paths in release workflow #11

refactor: Update artifact paths in release workflow

refactor: Update artifact paths in release workflow #11

Workflow file for this run

name: Build Desktop Distributions
on:
push:
tags:
- 'v*' # Runs on version tags like v1.0.0
jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
format: dmg
gradle_task: packageDmg
- os: windows-latest
format: msi
gradle_task: packageMsi
- os: ubuntu-latest
format: deb
gradle_task: packageDeb
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Grant execute permission for Gradlew
if: runner.os != 'Windows'
run: chmod +x gradlew
- name: Build native package
run: ./gradlew ${{ matrix.gradle_task }} --stacktrace
- name: Check build output
run: ls -R composeApp/build/compose/binaries || true
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.format }}
path: composeApp/build/compose/binaries/main/${{ matrix.format }}/
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: List downloaded files
run: ls -R ./artifacts
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/build-dmg/*.dmg
artifacts/build-msi/*.msi
artifacts/build-rpm/*.rpm
artifacts/build-deb/*.deb
draft: true
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}