diff --git a/.github/workflows/build-nightly.yml b/.github/workflows/build-nightly.yml index 5a6fc8d4f..baa09452e 100644 --- a/.github/workflows/build-nightly.yml +++ b/.github/workflows/build-nightly.yml @@ -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 diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index 59bf0a7b3..2d517eb30 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -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}} @@ -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: