1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-27 12:26:38 +01:00

Added dry run logic (#1376)

This commit is contained in:
Micaiah Martin 2022-02-25 08:13:39 -06:00 committed by GitHub
parent 8880e9700e
commit 1eac8f0c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ on:
options: options:
- Initial Release - Initial Release
- Redeploy - Redeploy
- Dry Run
jobs: jobs:
setup: setup:
@ -22,6 +23,7 @@ jobs:
branch-name: ${{ steps.branch.outputs.branch-name }} branch-name: ${{ steps.branch.outputs.branch-name }}
steps: steps:
- name: Branch check - name: Branch check
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
run: | run: |
if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix" ]]; then if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix" ]]; then
echo "===================================" echo "==================================="
@ -73,6 +75,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: Create release - name: Create release
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5 uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5
env: env:
PKG_VERSION: ${{ steps.retrieve-version.outputs.package_version }} PKG_VERSION: ${{ steps.retrieve-version.outputs.package_version }}
@ -151,6 +154,7 @@ jobs:
run: ls -alht dist run: ls -alht dist
- name: Deploy to Snap Store - name: Deploy to Snap Store
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
run: | run: |
snapcraft upload dist/bitwarden_${{ env._PKG_VERSION }}_amd64.snap --release stable snapcraft upload dist/bitwarden_${{ env._PKG_VERSION }}_amd64.snap --release stable
snapcraft logout snapcraft logout
@ -184,6 +188,7 @@ jobs:
path: ./dist path: ./dist
- name: Push to Chocolatey - name: Push to Chocolatey
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
shell: pwsh shell: pwsh
run: | run: |
cd dist cd dist