Skip to content

Commit

Permalink
updated automatic version detection in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cansik committed Dec 8, 2022
1 parent 7eaa027 commit 045ae03
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Build
on:
workflow_dispatch:
inputs:
tag:
description: 'Version Tag'
required: false
default: '0.8.2'
publishReleases:
description: 'Publish to Releases'
required: false
Expand All @@ -24,6 +20,15 @@ jobs:
distribution: 'temurin'
java-version: '11'

- 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 Release Package
run: |
./gradlew releaseProcessingLib --no-daemon
Expand All @@ -47,9 +52,9 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/*
tag: "v${{ github.event.inputs.tag }}-alpha"
release_name: "Version ${{ github.event.inputs.tag }}"
body: "Prebuilt deep-vision-processing libs version ${{ github.event.inputs.tag }}."
tag: "${{ steps.get_version.outputs.v_version }}"
release_name: "Version ${{ steps.get_version.outputs.version }}"
body: "Prebuilt deep-vision-processing libs version ${{ steps.get_version.outputs.v_version }}."
overwrite: true
file_glob: true
prerelease: true

0 comments on commit 045ae03

Please sign in to comment.