Skip to content

Commit

Permalink
First work on passing version string
Browse files Browse the repository at this point in the history
  • Loading branch information
flokuep committed Apr 24, 2024
1 parent 807edb1 commit e70ec23
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,28 @@ on:
branches: [ "develop" ]

jobs:
prepare-build:
name: Prepare build
runs-on: ubuntu-latest
outputs:
version: ${{ steps.previous-tag.outputs.tag }}-g${{ steps.shorten-sha.outputs.sha }}
steps:
- name: Get previous tag
id: previous-tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.0.0
- name: Shorten sha
id: shorten-sha
run: |
sha=$(echo ${{ github.sha }} | cut -c 1-7) >> $GITHUB_OUTPUT
build-windows:
name: Build Windows
needs: prepare-build
uses: ./.github/workflows/dotnet-desktop.yml
with:
version: ${{ needs.prepare-build.outputs }}-g${{ github.sha }}

publish:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build and test application

on:
workflow_call:
inputs:
version:
required: true
type: string
outputs:
x64:
value: ${{ jobs.build.outputs.x64}}
Expand All @@ -19,6 +23,7 @@ jobs:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
env:
Solution_Name: Vocaluxe.sln
VersionTag: ${{ inputs.version }}
Artifact_Name: Vocaluxe_Nightly_${{ matrix.platform }}

outputs:
Expand Down

0 comments on commit e70ec23

Please sign in to comment.