Skip to content

- update build

- update build #2

Workflow file for this run

name: Compose Desktop Build
env:
GITHUB_DEPLOY: 'false'
on:
push:
branches:
- master
tags:
- '*'
paths-ignore:
- LICENSE
- README.md
- 'docs/**'
- '.github/config/labels.yml'
pull_request:
branches:
- main
workflow_dispatch:
repository_dispatch:
types: [ app-release ]
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Package
timeout-minutes: 15
continue-on-error: true
# if: github.event_name == 'pull_request'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 18 ]
steps:
- name: Check out the source code
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 18
- name: Cache Gradle dependencies
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle Build
id: gradle-build
run: ./gradlew createDistributable
- name: Archive Artifacts
uses: actions/upload-artifact@v3
with:
name: distributable-${{ matrix.os }}
if-no-files-found: ignore
path: |
svgconverter/build/**/*.dmg
svgconverter/build/**/*.app
svgconverter/build/**/*.deb
svgconverter/build/**/*.msi
svgconverter/build/**/*.exe
svgconverter/build/compose/jars/*.jar
release:
name: Release new version
needs: [ build ]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Check out the source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download all the build artifacts
uses: actions/download-artifact@v3
with:
path: release-artifacts
- name: Github Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.github_release.outputs.changelog }}
prerelease: ${{ contains(github.event.inputs.version, '-rc') || contains(github.event.inputs.version, '-b') || contains(github.event.inputs.version, '-a') }}
files: |
${{ github.workspace }}/release-artifacts/**
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}