From 072dd0574d951120639357a0e5b68a2eaae09500 Mon Sep 17 00:00:00 2001 From: sevensolutions <84123899+sevensolutions@users.noreply.github.com> Date: Sat, 5 Oct 2024 19:28:45 +0200 Subject: [PATCH] Release pipeline --- .github/workflows/release.yml | 50 +++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f2a4459..a582681 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,9 @@ on: runId: description: "The id of the workflow run to create the release from" required: true + version: + description: "The version for the release" + required: true permissions: contents: write @@ -36,29 +39,36 @@ jobs: run-id: ${{ github.event.inputs.runId }} # Read version - - name: read version + - name: read and verify version run: | version=`cat ./version/version` - echo 'Version: ${version}' + echo "Release Version: ${{ github.event.inputs.version }}" + echo "Version in Build: ${version}" echo "VERSION=${version}" >> $GITHUB_ENV + if [ "${{ github.event.inputs.version }}" -neq "${version}" ] + then + echo "The specified release version doesn't match the version in the build. Please update PluginInfo.cs first." + exit 1 + fi + # Zip the artifacts - - uses: vimtor/action-zip@v1.2 - with: - files: ./nomad_iis - dest: nomad_iis.zip - - uses: vimtor/action-zip@v1.2 - with: - files: ./nomad_iis_mgmt_api - dest: nomad_iis_mgmt_api.zip + # - uses: vimtor/action-zip@v1.2 + # with: + # files: ./nomad_iis + # dest: nomad_iis.zip + # - uses: vimtor/action-zip@v1.2 + # with: + # files: ./nomad_iis_mgmt_api + # dest: nomad_iis_mgmt_api.zip - # Create the Release - - name: create release - uses: softprops/action-gh-release@v2 - with: - name: v${{ env.VERSION }} - tag_name: v${{ env.VERSION }} - draft: true - files: | - nomad_iis.zip - nomad_iis_mgmt_api.zip + # # Create the Release + # - name: create release + # uses: softprops/action-gh-release@v2 + # with: + # name: v${{ env.VERSION }} + # tag_name: v${{ env.VERSION }} + # draft: true + # files: | + # nomad_iis.zip + # nomad_iis_mgmt_api.zip