auto-release on tag push #7
Workflow file for this run
This file contains hidden or 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
| name: Dalvikus Cross-platform Release Build | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on tag push like v1.0.0 | |
| jobs: | |
| build: | |
| name: Build on ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: temurin | |
| - name: Grant execute permission for Gradle wrapper | |
| run: chmod +x ./gradlew | |
| - name: Build native installer | |
| shell: bash | |
| run: | | |
| if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | |
| ./gradlew composeApp:packageReleaseDeb --info --stacktrace | |
| elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then | |
| ./gradlew composeApp:packageReleaseMsi --info --stacktrace | |
| elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then | |
| ./gradlew composeApp:packageReleaseDmg --info --stacktrace | |
| fi | |
| - name: Upload installer artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dalvikus-${{ matrix.os }} | |
| path: | | |
| composeApp/build/compose/binaries/**/*.deb | |
| composeApp/build/compose/binaries/**/*.msi | |
| composeApp/build/compose/binaries/**/*.dmg | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Download all installer artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts # All artifacts will be downloaded into this directory | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| artifacts/dalvikus-ubuntu-latest/**/*.deb | |
| artifacts/dalvikus-windows-latest/**/*.msi | |
| artifacts/dalvikus-macos-latest/**/*.dmg |