From 23d4c03b2a9d8deeb45fc72b4c38f2f5a43088a7 Mon Sep 17 00:00:00 2001 From: Ping_timeout Date: Mon, 12 Aug 2024 10:03:54 +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) --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7956c38281..64e20ae0fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -195,3 +195,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