DEVOPS-852 - Update "Dry Run" paths in Release workflows (#3132)
This commit is contained in:
parent
2ddba6d2c3
commit
8aca6459cf
|
@ -134,6 +134,7 @@ jobs:
|
||||||
snapcraft_token: ${{ steps.retrieve-secrets.outputs.snapcraft-store-token }}
|
snapcraft_token: ${{ steps.retrieve-secrets.outputs.snapcraft-store-token }}
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download 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
|
||||||
|
@ -142,6 +143,16 @@ jobs:
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bw_${{ env._PKG_VERSION }}_amd64.snap
|
artifacts: bw_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
|
|
||||||
|
- name: Download 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
|
||||||
|
artifacts: bw_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
|
|
||||||
- name: Publish Snap & logout
|
- name: Publish Snap & logout
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -182,6 +193,7 @@ jobs:
|
||||||
run: New-Item -ItemType directory -Path ./dist
|
run: New-Item -ItemType directory -Path ./dist
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download 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
|
||||||
|
@ -190,6 +202,16 @@ jobs:
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
artifacts: bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
||||||
|
|
||||||
|
- name: Download artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
|
with:
|
||||||
|
workflow: build-cli.yml
|
||||||
|
path: apps/cli/dist
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: master
|
||||||
|
artifacts: bitwarden-cli.${{ env._PKG_VERSION }}.nupkg
|
||||||
|
|
||||||
- name: Push to Chocolatey
|
- name: Push to Chocolatey
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
@ -222,6 +244,7 @@ jobs:
|
||||||
secrets: "cli-npm-api-key"
|
secrets: "cli-npm-api-key"
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download 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
|
||||||
|
@ -230,6 +253,16 @@ jobs:
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
|
artifacts: bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
|
||||||
|
|
||||||
|
- name: Download artifacts
|
||||||
|
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
|
with:
|
||||||
|
workflow: build-cli.yml
|
||||||
|
path: apps/cli/build
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: master
|
||||||
|
artifacts: bitwarden-cli-${{ env._PKG_VERSION }}-npm-build.zip
|
||||||
|
|
||||||
- name: Setup NPM
|
- name: Setup NPM
|
||||||
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
|
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -198,6 +198,7 @@ jobs:
|
||||||
working-directory: apps/desktop
|
working-directory: apps/desktop
|
||||||
|
|
||||||
- name: Download Snap artifact
|
- name: Download Snap artifact
|
||||||
|
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
|
||||||
|
@ -206,6 +207,16 @@ jobs:
|
||||||
artifacts: bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
artifacts: bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
path: apps/desktop/dist
|
path: apps/desktop/dist
|
||||||
|
|
||||||
|
- name: Download Snap artifact
|
||||||
|
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
|
||||||
|
artifacts: bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
|
path: apps/desktop/dist
|
||||||
|
|
||||||
- name: Deploy to Snap Store
|
- name: Deploy to Snap Store
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -253,6 +264,7 @@ jobs:
|
||||||
working-directory: apps/desktop
|
working-directory: apps/desktop
|
||||||
|
|
||||||
- name: Download choco artifact
|
- name: Download choco artifact
|
||||||
|
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
|
||||||
|
@ -261,6 +273,16 @@ jobs:
|
||||||
artifacts: bitwarden.${{ env._PKG_VERSION }}.nupkg
|
artifacts: bitwarden.${{ env._PKG_VERSION }}.nupkg
|
||||||
path: apps/desktop/dist
|
path: apps/desktop/dist
|
||||||
|
|
||||||
|
- name: Download choco artifact
|
||||||
|
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
|
||||||
|
artifacts: bitwarden.${{ env._PKG_VERSION }}.nupkg
|
||||||
|
path: apps/desktop/dist
|
||||||
|
|
||||||
- name: Push to Chocolatey
|
- name: Push to Chocolatey
|
||||||
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
|
@ -153,6 +153,7 @@ jobs:
|
||||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
||||||
|
|
||||||
- name: Download latest cloud asset
|
- name: Download latest cloud asset
|
||||||
|
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
|
||||||
|
@ -161,6 +162,16 @@ jobs:
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
artifacts: web-*-cloud-COMMERCIAL.zip
|
artifacts: web-*-cloud-COMMERCIAL.zip
|
||||||
|
|
||||||
|
- name: Download latest cloud asset
|
||||||
|
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
||||||
|
uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8
|
||||||
|
with:
|
||||||
|
workflow: build-web.yml
|
||||||
|
path: apps/web
|
||||||
|
workflow_conclusion: success
|
||||||
|
branch: master
|
||||||
|
artifacts: web-*-cloud-COMMERCIAL.zip
|
||||||
|
|
||||||
# This should result in a build directory in the current working directory
|
# This should result in a build directory in the current working directory
|
||||||
- name: Unzip build asset
|
- name: Unzip build asset
|
||||||
working-directory: apps/web
|
working-directory: apps/web
|
||||||
|
@ -190,7 +201,10 @@ jobs:
|
||||||
git switch -c cf-pages-deploy-$_TAG_VERSION
|
git switch -c cf-pages-deploy-$_TAG_VERSION
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Staging deploy ${{ needs.setup.outputs.release_version }}"
|
git commit -m "Staging deploy ${{ needs.setup.outputs.release_version }}"
|
||||||
git push -u origin cf-pages-deploy-$_TAG_VERSION
|
|
||||||
|
if [[ "${{ github.event.inputs.release_type }}" != "Dry Run" ]]; then
|
||||||
|
git push -u origin cf-pages-deploy-$_TAG_VERSION
|
||||||
|
fi
|
||||||
working-directory: deployment
|
working-directory: deployment
|
||||||
|
|
||||||
- name: Create CloudFlare Pages Deploy PR
|
- name: Create CloudFlare Pages Deploy PR
|
||||||
|
@ -253,20 +267,3 @@ jobs:
|
||||||
apps/web/artifacts/web-${{ needs.setup.outputs.release_version }}-selfhosted-open-source.zip"
|
apps/web/artifacts/web-${{ needs.setup.outputs.release_version }}-selfhosted-open-source.zip"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
|
|
||||||
dry-run:
|
|
||||||
name: Dry Run Cleanup
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
if: ${{ github.event.inputs.release_type == 'Dry Run' }}
|
|
||||||
env:
|
|
||||||
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
|
||||||
needs:
|
|
||||||
- setup
|
|
||||||
- release
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
|
||||||
|
|
||||||
- name: Remove cf-pages-deploy branch
|
|
||||||
run: git push origin --delete cf-pages-deploy-$_TAG_VERSION
|
|
||||||
|
|
Loading…
Reference in New Issue