From 0fe1c9d00ed98ff548696145445a643cfb1b97d4 Mon Sep 17 00:00:00 2001 From: Rengyr Date: Mon, 4 Nov 2024 21:00:59 +0100 Subject: [PATCH] Setup build and release workflow --- .github/workflows/build-release.yml | 38 +++++++++++++++++++++++++++++ Cargo.lock | 8 +++--- src/build_test.txt | 0 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build-release.yml create mode 100644 src/build_test.txt diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..ed59bca --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,38 @@ +# .github/workflows/build.yml +name: Build and release + +on: + push: + branches: [main] + +jobs: + build: + name: Build and Release + permissions: write-all + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Compile + id: compile + uses: rust-build/rust-build.action@v1.4.5 + with: + RUSTTARGET: x86_64-unknown-linux-musl + UPLOAD_MODE: none + MINIFY: true + ARCHIVE_NAME: Vulpes-Porto_x86_64-unknown-linux-musl + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: Binary + path: | + ${{ steps.compile.outputs.BUILT_ARCHIVE }} + ${{ steps.compile.outputs.BUILT_CHECKSUM }} + - name: Make release + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Automatic Build" + files: | + ${{ steps.compile.outputs.BUILT_ARCHIVE }} diff --git a/Cargo.lock b/Cargo.lock index aff5297..fcd11c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -255,9 +255,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -468,9 +468,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "link-cplusplus" diff --git a/src/build_test.txt b/src/build_test.txt new file mode 100644 index 0000000..e69de29