From a2688a76ff0067760e6e8ac7e1a6052a7c39801b Mon Sep 17 00:00:00 2001 From: Alan Rynne Date: Tue, 13 Aug 2024 16:36:51 +0200 Subject: [PATCH] feat: Add GitVersion to sketchup CI run --- .github/workflows/build_installer.yml | 17 +++++++++++++---- GitVersion.yml | 11 +++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 GitVersion.yml diff --git a/.github/workflows/build_installer.yml b/.github/workflows/build_installer.yml index c883a864..63dec78f 100644 --- a/.github/workflows/build_installer.yml +++ b/.github/workflows/build_installer.yml @@ -17,28 +17,37 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Python 3.10 uses: actions/setup-python@v3 with: python-version: "3.10" - # TODO: Generate version!!!!! + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v3.0.0 + with: + versionSpec: '6.x' + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v3.0.0 - name: Set connector version run: | - python patch_version.py 3.0.0-alpha + python patch_version.py ${{steps.gitversion.outputs.semVer}} + - uses: montudor/action-zip@v1 with: args: zip -q -r sketchup.zip vendor speckle_connector_3/ speckle_connector_3.rb - name: ⬆️ Upload artifacts uses: actions/upload-artifact@v4 with: - name: output-3.0.0-alpha + name: output-${{steps.gitversion.outputs.semVer}} path: sketchup.zip compression-level: 0 # no compression - id: set-version name: Set version to output - run: echo "version=3.0.0-alpha" >> "$GITHUB_OUTPUT" # version will be retrieved from tag? + run: echo "version=${{steps.gitversion.outputs.semVer}}" >> "$GITHUB_OUTPUT" # version will be retrieved from tag? deploy-installers: diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 00000000..c4677e14 --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,11 @@ +next-version: 3.0.0 +mode: ContinuousDeployment +assembly-informational-format: "{Major}.{Minor}.{Patch}-{PreReleaseTag}" +branches: + main: + regex: ^main$ + tag: rc + development: + tag: dev + pull-request: + tag: pr