From 3dc7fde5e91a2b4f247dc09b5df32cbf5b060ff2 Mon Sep 17 00:00:00 2001 From: "B. Blechschmidt" Date: Fri, 31 Mar 2023 02:02:12 +0200 Subject: [PATCH] Publish build for every commit as prerelease --- .github/workflows/publish-exe.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish-exe.yml diff --git a/.github/workflows/publish-exe.yml b/.github/workflows/publish-exe.yml new file mode 100644 index 0000000..918c177 --- /dev/null +++ b/.github/workflows/publish-exe.yml @@ -0,0 +1,33 @@ +on: + push: + branches: [master] + workflow_dispatch: + +name: Build and publish executable + +jobs: + build_publish: + name: Build and publish executable + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release --target x86_64-unknown-linux-gnu + - name: Rename + run: mkdir build && mv target/x86_64-unknown-linux-gnu/release/tun2proxy build/tun2proxy-x86_64 + - name: Publish + uses: softprops/action-gh-release@v1 + with: + name: Automated build of ${{ github.sha }} + files: build/* + draft: false + prerelease: true + body: This is an automated build of commit ${{ github.sha }}. + tag_name: r${{ github.sha }} \ No newline at end of file