From e9d0dcb0582928f1b430d7a999be8d0b5fc4a802 Mon Sep 17 00:00:00 2001 From: Ping_timeout Date: Mon, 18 Nov 2024 19:41:18 +0800 Subject: [PATCH] Update build.yml (#17) (#24) (#27) (#31) (#45) (#54) (#62) (#65) (#77) (#80) (#85) (#92) (#98) (#106) (#107) (#114) (#115) (#125) (#136) (#140) (#142) (#147) (#148) (#150) --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a025041fa9..a88edfc3b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -196,3 +196,45 @@ jobs: run: | echo "### :tada: Checks Passed!" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY + + + + # Build the binary to upload to the artifacts + - name: "build features: sqlite,mysql,postgresql" + if: ${{ matrix.channel == 'rust-toolchain' }} + run: | + cargo build --release --features sqlite,mysql,postgresql + # End Build the binary + + + # Upload artifact to Github Actions + - name: "Upload artifact" + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + if: ${{ matrix.channel == 'rust-toolchain' }} + with: + name: vaultwarden + path: target/release/vaultwarden + # End Upload artifact to Github Actions + + + - name: release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/${{ matrix.target-triple }}/release/vaultwarden${{ matrix.ext }} + tag: ${{ github.ref }} + asset_name: vaultwarden_$tag + overwrite: true + body: "https://github.com/dani-garcia/vaultwarden/releases" + + ## This is not used at the moment + ## We could start using this when we can build static binaries + # Upload to github actions release + # - name: Release + # uses: Shopify/upload-to-release@1 + # if: startsWith(github.ref, 'refs/tags/') + # with: + # name: vaultwarden-${{ matrix.target-triple }}${{ matrix.ext }} + # path: target/${{ matrix.target-triple }}/release/vaultwarden${{ matrix.ext }} + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # End Upload to github actions release