Skip to content

Commit

Permalink
added initial github actions support
Browse files Browse the repository at this point in the history
  • Loading branch information
cansik committed Nov 11, 2022
1 parent 5b06b8a commit 31aad0c
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Distribute Version

on:
workflow_dispatch:
inputs:
publishReleases:
description: 'Publish to Releases'
required: false
default: 'true'

#--macos-universal2
jobs:
distribute:
runs-on: ${{ matrix.os.host }}
strategy:
fail-fast: false
matrix:
os:
- name: windows
host: windows-latest
args:

- name: macos
host: macos-12
args:

- name: ubuntu
host: ubuntu-latest
args:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Get Library Version
id: get_version
run: |
lib_version="$(./gradlew properties | grep ^version: | cut -d' ' -f2)"
echo "Library Version: $lib_version"
echo "version=$lib_version" >> $GITHUB_OUTPUT
echo "v_version=v$lib_version" >> $GITHUB_OUTPUT
shell: bash

- name: Build on ${{ matrix.os.name }}
run: |
echo "V-Version: ${{ steps.get_version.outputs.v_version }}"
./gradlew clean build jpackage --info
shell: bash

# upload dist
- name: Upload binaries to release
if: ${{ github.event.inputs.publishReleases == 'true' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/dist/*
tag: ${{ steps.get_version.outputs.v_version }}
release_name: "Version ${{ steps.get_version.outputs.version }}"
body: "Prebuilt packages for version ${{ steps.get_version.outputs.version }}."
overwrite: true
file_glob: true
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group 'ch.zhdk.tracking'
version '1.3.0'
version '1.3.1'

ext.ktor_version = '1.2.2'

Expand Down

0 comments on commit 31aad0c

Please sign in to comment.