1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

Merge pull request #2146 from bitwarden/hotfix/release-workflow-release-asset-names

Hotfix/release workflow release asset names
This commit is contained in:
Joseph Flinn 2021-10-27 11:18:52 -07:00 committed by GitHub
commit a93179e020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 15 deletions

View File

@ -115,7 +115,7 @@ jobs:
shell: cmd shell: cmd
run: | run: |
mkdir dist\Source mkdir dist\Source
call git clone %_REPO_URL% dist\Source call git clone %GITHUB_SERVER_URL%/%GITHUB_REPOSITORY% dist\Source
cd dist\Source cd dist\Source
call git checkout %GITHUB_SHA% call git checkout %GITHUB_SHA%
call git submodule update --init --recursive call git submodule update --init --recursive

View File

@ -83,32 +83,43 @@ jobs:
- setup - setup
- locales-test - locales-test
steps: 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 - name: Download latest RC build artifacts
uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783 uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783
with: with:
workflow: build.yml workflow: build.yml
workflow_conclusion: success workflow_conclusion: success
branch: release branch: release
artifacts: 'browser-source-*.zip, artifacts: 'browser-source-${{ steps.get-build-commit.outputs.build-commit }}.zip,
dist-chrome-*.zip, dist-chrome-${{ steps.get-build-commit.outputs.build-commit }}.zip,
dist-opera-*.zip, dist-opera-${{ steps.get-build-commit.outputs.build-commit }}.zip,
dist-firefox-*.zip, dist-firefox-${{ steps.get-build-commit.outputs.build-commit }}.zip,
dist-edge-*.zip' dist-edge-${{ steps.get-build-commit.outputs.build-commit }}.zip'
- name: Get build number - name: Rename build artifacts
id: get-build-number env:
BUILD_COMMIT: ${{ steps.get-build-commit.outputs.build-commit }}
PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
run: | run: |
build_num=$(ls browser-source-* | grep -oE "[0-9]+") mv browser-source-$BUILD_COMMIT.zip browser-source-$PACKAGE_VERSION.zip
echo "::set-output name=build-number::$build_num" 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 - name: Create release
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09
with: with:
artifacts: 'browser-source-${{ steps.get-build-number.outputs.build-number }}.zip, artifacts: 'browser-source-${{ needs.setup.outputs.release-version }}.zip,
dist-chrome-${{ steps.get-build-number.outputs.build-number }}.zip, dist-chrome-${{ needs.setup.outputs.release-version }}.zip,
dist-opera-${{ steps.get-build-number.outputs.build-number }}.zip, dist-opera-${{ needs.setup.outputs.release-version }}.zip,
dist-firefox-${{ steps.get-build-number.outputs.build-number }}.zip, dist-firefox-${{ needs.setup.outputs.release-version }}.zip,
dist-edge-${{ steps.get-build-number.outputs.build-number }}.zip' dist-edge-${{ needs.setup.outputs.release-version }}.zip'
commit: ${{ github.sha }} commit: ${{ github.sha }}
tag: "v${{ needs.setup.outputs.release-version }}" tag: "v${{ needs.setup.outputs.release-version }}"
name: "Version ${{ needs.setup.outputs.release-version }}" name: "Version ${{ needs.setup.outputs.release-version }}"