Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Fix for new lunar launcher #69

Fix for new lunar launcher

Fix for new lunar launcher #69

Workflow file for this run

name: build/release
on:
push:
branches: [ "master" ]
tags: [ "v[0-9]+.[0-9]+.[0-9]+" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
permissions:
contents: write
jobs:
create-release:
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- run: gh release create ${{ github.ref_name }} -R ${{ github.repository }} --draft --title ${GITHUB_REF_NAME#v} -n ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
needs: [create-release]
if: always() && !failure() && !cancelled()
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: dtolnay/rust-toolchain@nightly
- uses: mozilla-actions/sccache-action@v0.0.3
- name: Build with Gradle
uses: gradle/gradle-build-action@v2.7.0
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
with:
arguments: assembleDist installDist
- name: Create Windows Installer
if: runner.os == 'Windows' && github.ref_type == 'tag'
working-directory: installer
run: iscc installer.iss /DAppVersion=$($env:GITHUB_REF_NAME.Substring(1))
- name: Upload Release Artifact
if: github.ref_type == 'tag'
shell: bash
run: |
os=$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')
case $os in
windows)
mv build/distributions/lcqt2.zip windows-portable.zip
artifacts="windows-portable.zip installer/*.exe";;
*)
mv build/distributions/lcqt2.tar.gz $os-portable.tar.gz
artifacts="$os-portable.tar.gz";;
esac
gh release upload ${{ github.ref_name }} $artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}