From 1f6856aaec505c6a62350746c828f12d39c436af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ch=C4=99ci=C5=84ski?= Date: Wed, 2 Aug 2023 11:37:37 +0200 Subject: [PATCH] Fix workflows (#133) * Fix release dry run job * Add rc and hotfix-rc to rust test triggers * Remove napi github release --------- Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> --- .github/workflows/build-rust-crates.yml | 4 ++-- .github/workflows/release-napi.yml | 32 ------------------------- .github/workflows/rust-test.yml | 5 +++- 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-rust-crates.yml b/.github/workflows/build-rust-crates.yml index 905361459..e81c387e2 100644 --- a/.github/workflows/build-rust-crates.yml +++ b/.github/workflows/build-rust-crates.yml @@ -59,7 +59,7 @@ jobs: release-dry-run: name: Release dry-run runs-on: ubuntu-latest - if: ${{ github.ref == 'ref/head/master' || github.ref == 'ref/head/rc' || github.ref == 'ref/head/hotfix-rc' }} + if: ${{ github.ref == 'refs/head/master' || github.ref == 'refs/head/rc' || github.ref == 'refs/head/hotfix-rc' }} needs: - build steps: @@ -79,4 +79,4 @@ jobs: run: cargo install cargo-release - name: Cargo release dry run - run: cargo-release release publish -p bitwarden-api-api -p bitwarden-api-identity -p bitwarden + run: cargo-release release publish --no-publish -p bitwarden-api-api -p bitwarden-api-identity -p bitwarden diff --git a/.github/workflows/release-napi.yml b/.github/workflows/release-napi.yml index e684ebcf0..3a7928580 100644 --- a/.github/workflows/release-napi.yml +++ b/.github/workflows/release-napi.yml @@ -65,38 +65,6 @@ jobs: description: "Deployment ${{ steps.version.outputs.version }} from branch ${{ github.ref_name }}" task: release - - name: Download all Release artifacts - if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@12452ffcde72eca60a91abef555090ad17ba2108 - with: - workflow: build-napi.yml - path: artifacts - workflow_conclusion: success - branch: ${{ github.ref_name }} - - - name: Dry Run - Download all artifacts - if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: bitwarden/gh-actions/download-artifacts@12452ffcde72eca60a91abef555090ad17ba2108 - with: - workflow: build-napi.yml - path: artifacts - workflow_conclusion: success - branch: master - - - name: Create release - if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0 - env: - PKG_VERSION: ${{ steps.version.outputs.version }} - with: - artifacts: "" - commit: ${{ github.sha }} - tag: sdk-napi-v${{ env.PKG_VERSION }} - name: Bitwarden SDK NAPI v${{ env.PKG_VERSION }} - body: "" - token: ${{ secrets.GITHUB_TOKEN }} - draft: true - - name: Update deployment status to Success if: ${{ github.event.inputs.release_type != 'Dry Run' && success() }} uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1 diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index 3b9464bf8..5fea88a93 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -3,7 +3,10 @@ name: Rust tests on: workflow_dispatch: push: - branches: ["master"] + branches: + - "master" + - "rc" + - "hotfix-rc" pull_request: env: