diff --git a/.github/actions/get-version/action.yml b/.github/actions/get-version/action.yml index 940f1290a..0355458f9 100644 --- a/.github/actions/get-version/action.yml +++ b/.github/actions/get-version/action.yml @@ -7,4 +7,9 @@ runs: steps: - run: | echo "DESKFLOW_VERSION=$(git describe --long | sed 's/-/./g;s/v//g' | grep -o '^[0-9]*.[0-9]*.[0-9]*.[0-9]*')">> $GITHUB_ENV + if [[ "$GITHUB_REF" == *"tags/v"* ]]; then + echo "DESKFLOW_PACKAGE_VERSION=$(echo $GITHUB_REF | sed 's/v//g')">> $GITHUB_ENV + else + echo "DESKFLOW_PACKAGE_VERSION=continuous">> $GITHUB_ENV + fi shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 164d263c6..6ee459325 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -246,7 +246,7 @@ jobs: if: ${{ runner.os != 'Linux' }} shell: bash run: | - python ./scripts/package.py --package-version ${{env.DESKFLOW_VERSION}} + python ./scripts/package.py --package-version ${{env.DESKFLOW_PACKAGE_VERSION}} mv dist/deskflow* build/ env: WINDOWS_PFX_CERTIFICATE: ${{ secrets.WINDOWS_PFX }} @@ -308,6 +308,10 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 + - name: Get version + if: (github.ref == 'refs/heads/master') && !(contains(github.ref, '/tags/v')) + uses: ./.github/actions/get-version + - name: Deploy continuous if: (github.ref == 'refs/heads/master') && !(contains(github.ref, '/tags/v')) uses: crowbarmaster/GH-Automatic-Releases@latest @@ -315,7 +319,7 @@ jobs: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "continuous" prerelease: true - title: "Continuous Build" + title: "Continuous Build: ${{env.DESKFLOW_VERSION}}" files: | package-*/* @@ -342,5 +346,5 @@ jobs: - name: Submit uses: ./.github/actions/winget-publish with: - release-version: ${{env.DESKFLOW_VERSION}} + release-version: ${{env.DESKFLOW_PACKAGE_VERSION}} token: ${{ secrets.WINGET_DEPLOY_TOKEN }}