From 472be6ea69065b38bb6a01496638e80b249f4f0e Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Wed, 27 Oct 2021 10:49:50 -0700 Subject: [PATCH 1/2] fixing the env vars for building the zipped source --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c784cff676..5cfcb75f44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,7 +115,7 @@ jobs: shell: cmd run: | mkdir dist\Source - call git clone %_REPO_URL% dist\Source + call git clone %GITHUB_SERVER_URL%/%GITHUB_REPOSITORY% dist\Source cd dist\Source call git checkout %GITHUB_SHA% call git submodule update --init --recursive From a60cb8cc93283e9c47379d75df618b6d444ece51 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Wed, 27 Oct 2021 11:01:02 -0700 Subject: [PATCH 2/2] Renaming the release assets with the release version instead of the commit hash --- .github/workflows/release.yml | 39 ++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fff1dbcef..78132e3f4b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,32 +83,43 @@ jobs: - setup - locales-test steps: + - name: Get build number + id: get-build-commit + run: | + build_commit=$(ls browser-source-* | cut -d '.' -f 1 | cut -d '-' -f 3) + echo "::set-output name=build-commit::$build_commit" + - name: Download latest RC build artifacts uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783 with: workflow: build.yml workflow_conclusion: success branch: release - artifacts: 'browser-source-*.zip, - dist-chrome-*.zip, - dist-opera-*.zip, - dist-firefox-*.zip, - dist-edge-*.zip' + artifacts: 'browser-source-${{ steps.get-build-commit.outputs.build-commit }}.zip, + dist-chrome-${{ steps.get-build-commit.outputs.build-commit }}.zip, + dist-opera-${{ steps.get-build-commit.outputs.build-commit }}.zip, + dist-firefox-${{ steps.get-build-commit.outputs.build-commit }}.zip, + dist-edge-${{ steps.get-build-commit.outputs.build-commit }}.zip' - - name: Get build number - id: get-build-number + - name: Rename build artifacts + env: + BUILD_COMMIT: ${{ steps.get-build-commit.outputs.build-commit }} + PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }} run: | - build_num=$(ls browser-source-* | grep -oE "[0-9]+") - echo "::set-output name=build-number::$build_num" + mv browser-source-$BUILD_COMMIT.zip browser-source-$PACKAGE_VERSION.zip + mv dist-chrome-$BUILD_COMMIT.zip dist-chrome-$PACKAGE_VERSION.zip + mv dist-opera-$BUILD_COMMIT.zip dist-opera-$PACKAGE_VERSION.zip + mv dist-firefox-$BUILD_COMMIT.zip dist-firefox-$PACKAGE_VERSION.zip + mv dist-edge-$BUILD_COMMIT.zip dist-edge-$PACKAGE_VERSION.zip - name: Create release uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 with: - artifacts: 'browser-source-${{ steps.get-build-number.outputs.build-number }}.zip, - dist-chrome-${{ steps.get-build-number.outputs.build-number }}.zip, - dist-opera-${{ steps.get-build-number.outputs.build-number }}.zip, - dist-firefox-${{ steps.get-build-number.outputs.build-number }}.zip, - dist-edge-${{ steps.get-build-number.outputs.build-number }}.zip' + artifacts: 'browser-source-${{ needs.setup.outputs.release-version }}.zip, + dist-chrome-${{ needs.setup.outputs.release-version }}.zip, + dist-opera-${{ needs.setup.outputs.release-version }}.zip, + dist-firefox-${{ needs.setup.outputs.release-version }}.zip, + dist-edge-${{ needs.setup.outputs.release-version }}.zip' commit: ${{ github.sha }} tag: "v${{ needs.setup.outputs.release-version }}" name: "Version ${{ needs.setup.outputs.release-version }}"