From 59884c0d868262d869f0b10b223e7d781d896a56 Mon Sep 17 00:00:00 2001 From: Kan-Ru Chen Date: Sun, 22 Dec 2024 16:33:58 +0900 Subject: [PATCH] ci: use different version for PR and nightly --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33c1c99..91f4160 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,12 +61,21 @@ jobs: vcpkg install --triplet x64-windows-static sqlite3 - name: Generate nightly version info - if: ${{ inputs.nightly }} || github.event_name == 'pull_request' + if: ${{ inputs.nightly }} run: | cargo xtask update-version --major $env:VER_MAJOR --minor $env:VER_MINOR --patch $env:VER_PATCH -b $env:GITHUB_RUN_NUMBER type version.rc type installer/version.wxi + - name: Generate pull_request version info + if: github.event_name == 'pull_request' + env: + PR_NUMBER: ${{ github.event.number }} + run: | + cargo xtask update-version --major 0 --minor 0 --patch $env:PR_NUMBER -b $env:GITHUB_RUN_NUMBER + type version.rc + type installer/version.wxi + - name: Build shell: cmd run: |