Skip to content

Commit

Permalink
Fix workflows (#133)
Browse files Browse the repository at this point in the history
* Fix release dry run job

* Add rc and hotfix-rc to rust test triggers

* Remove napi github release

---------

Co-authored-by: Vince Grassia <[email protected]>
  • Loading branch information
michalchecinski and vgrassia authored Aug 2, 2023
1 parent a5409f7 commit 1f6856a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-rust-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
32 changes: 0 additions & 32 deletions .github/workflows/release-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<insert release notes here>"
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
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: Rust tests
on:
workflow_dispatch:
push:
branches: ["master"]
branches:
- "master"
- "rc"
- "hotfix-rc"
pull_request:

env:
Expand Down

0 comments on commit 1f6856a

Please sign in to comment.