Fix Choco Release & Update Dry Run logic (#3017)
* disabling snap for testing * adding in environment logging * adding in some Dry Run logic * adding more protected dry run logic * skipping long running steps for testing purposes * testing out windowws-2022 runner * Trying a different GitHub Action expression syntax * manually disabling jobs because I don't have time to figure out GitHub's weird syntax * updating nuget on windows-2019 * disabling the nuget version 6 * trying more GitHub Action syntax * disabling choco for testing * running test on Dry Run release * changing the double quotes to single quotes inside the GitHub Action expression * removing testing code * updating more dry run logic * reverting a branch name change
This commit is contained in:
parent
a2360aebd2
commit
6bcde3a84c
|
@ -90,7 +90,8 @@ jobs:
|
||||||
- setup
|
- setup
|
||||||
- locales-test
|
- locales-test
|
||||||
steps:
|
steps:
|
||||||
- name: Download latest RC build artifacts
|
- name: Download latest Release build artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
with:
|
with:
|
||||||
workflow: build-browser.yml
|
workflow: build-browser.yml
|
||||||
|
@ -102,6 +103,19 @@ jobs:
|
||||||
dist-firefox-*.zip,
|
dist-firefox-*.zip,
|
||||||
dist-edge-*.zip'
|
dist-edge-*.zip'
|
||||||
|
|
||||||
|
- name: Download latest master build artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
|
with:
|
||||||
|
workflow: build-browser.yml
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: master
|
||||||
|
artifacts: 'browser-source-*.zip,
|
||||||
|
dist-chrome-*.zip,
|
||||||
|
dist-opera-*.zip,
|
||||||
|
dist-firefox-*.zip,
|
||||||
|
dist-edge-*.zip'
|
||||||
|
|
||||||
- name: Rename build artifacts
|
- name: Rename build artifacts
|
||||||
env:
|
env:
|
||||||
PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
||||||
|
|
|
@ -48,7 +48,8 @@ jobs:
|
||||||
monorepo: true
|
monorepo: true
|
||||||
monorepo-project: cli
|
monorepo-project: cli
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all Release artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
with:
|
with:
|
||||||
workflow: build-cli.yml
|
workflow: build-cli.yml
|
||||||
|
@ -56,6 +57,15 @@ jobs:
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
|
|
||||||
|
- name: Download all artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
|
with:
|
||||||
|
workflow: build-cli.yml
|
||||||
|
path: apps/cli
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: master
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
|
uses: ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
|
||||||
|
|
|
@ -78,6 +78,7 @@ jobs:
|
||||||
secrets: "aws-electron-access-id, aws-electron-access-key, aws-electron-bucket-name"
|
secrets: "aws-electron-access-id, aws-electron-access-key, aws-electron-bucket-name"
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783
|
uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783
|
||||||
with:
|
with:
|
||||||
workflow: build-desktop.yml
|
workflow: build-desktop.yml
|
||||||
|
@ -85,6 +86,15 @@ jobs:
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
path: apps/desktop/artifacts
|
path: apps/desktop/artifacts
|
||||||
|
|
||||||
|
- name: Download all artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@23433be15ed6fd046ce12b6889c5184a8d9c8783
|
||||||
|
with:
|
||||||
|
workflow: build-desktop.yml
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: master
|
||||||
|
path: apps/desktop/artifacts
|
||||||
|
|
||||||
- name: Rename .pkg to .pkg.archive
|
- name: Rename .pkg to .pkg.archive
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ steps.version.outputs.version }}
|
PKG_VERSION: ${{ steps.version.outputs.version }}
|
||||||
|
@ -92,6 +102,7 @@ jobs:
|
||||||
run: mv Bitwarden-${{ env.PKG_VERSION }}-universal.pkg Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive
|
run: mv Bitwarden-${{ env.PKG_VERSION }}-universal.pkg Bitwarden-${{ env.PKG_VERSION }}-universal.pkg.archive
|
||||||
|
|
||||||
- name: Publish artifacts to S3
|
- name: Publish artifacts to S3
|
||||||
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ steps.retrieve-secrets.outputs.aws-electron-access-id }}
|
AWS_ACCESS_KEY_ID: ${{ steps.retrieve-secrets.outputs.aws-electron-access-id }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ steps.retrieve-secrets.outputs.aws-electron-access-key }}
|
AWS_SECRET_ACCESS_KEY: ${{ steps.retrieve-secrets.outputs.aws-electron-access-key }}
|
||||||
|
@ -106,7 +117,7 @@ jobs:
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5
|
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5
|
||||||
if: ${{ steps.release-channel.outputs.channel }} == "latest"
|
if: ${{ steps.release-channel.outputs.channel == 'latest' && github.event.inputs.release_type != 'Dry Run' }}
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ steps.version.outputs.version }}
|
PKG_VERSION: ${{ steps.version.outputs.version }}
|
||||||
RELEASE_CHANNEL: ${{ steps.release-channel.outputs.channel }}
|
RELEASE_CHANNEL: ${{ steps.release-channel.outputs.channel }}
|
||||||
|
@ -200,6 +211,11 @@ jobs:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
|
- name: Print Environment
|
||||||
|
run: |
|
||||||
|
dotnet --version
|
||||||
|
dotnet nuget --version
|
||||||
|
|
||||||
- name: Login to Azure
|
- name: Login to Azure
|
||||||
uses: Azure/login@24848bc889cfc0a8313c2b3e378ac0d625b9bc16
|
uses: Azure/login@24848bc889cfc0a8313c2b3e378ac0d625b9bc16
|
||||||
with:
|
with:
|
||||||
|
@ -213,6 +229,7 @@ jobs:
|
||||||
secrets: "cli-choco-api-key"
|
secrets: "cli-choco-api-key"
|
||||||
|
|
||||||
- name: Setup Chocolatey
|
- name: Setup Chocolatey
|
||||||
|
shell: pwsh
|
||||||
run: choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
|
run: choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
|
||||||
env:
|
env:
|
||||||
CHOCO_API_KEY: ${{ steps.retrieve-secrets.outputs.cli-choco-api-key }}
|
CHOCO_API_KEY: ${{ steps.retrieve-secrets.outputs.cli-choco-api-key }}
|
||||||
|
|
|
@ -222,6 +222,7 @@ jobs:
|
||||||
- cfpages-deploy
|
- cfpages-deploy
|
||||||
steps:
|
steps:
|
||||||
- name: Download latest build artifacts
|
- name: Download latest build artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
with:
|
with:
|
||||||
workflow: build-web.yml
|
workflow: build-web.yml
|
||||||
|
@ -231,6 +232,17 @@ jobs:
|
||||||
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
|
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
|
||||||
web-*-selfhosted-open-source.zip"
|
web-*-selfhosted-open-source.zip"
|
||||||
|
|
||||||
|
- name: Download latest build artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
|
with:
|
||||||
|
workflow: build-web.yml
|
||||||
|
path: apps/web/artifacts
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: master
|
||||||
|
artifacts: "web-*-selfhosted-COMMERCIAL.zip,
|
||||||
|
web-*-selfhosted-open-source.zip"
|
||||||
|
|
||||||
- name: Rename assets
|
- name: Rename assets
|
||||||
working-directory: apps/web/artifacts
|
working-directory: apps/web/artifacts
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in New Issue