From e18abaadf74cbfb1723e1fea1b2e7f43c368f3ed Mon Sep 17 00:00:00 2001 From: lockieluke Date: Sat, 13 Jan 2024 00:57:40 +0000 Subject: [PATCH] Build on CI when pushed to main --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..37173f8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +on: + push: + branches: [ main ] +jobs: + build: + runs-on: [ self-hosted, macOS, ARM64 ] + steps: + - uses: actions/checkout@v3 + + - name: Setup Rust Toolchain + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: stable + + - name: Build + run: cargo build --release + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: swift-precompiler + path: target/release/swift-precompiler + + - uses: sarisia/actions-status-discord@v1 + if: always() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + status: ${{ job.status }} + title: "deploy" + description: "Build swift-precompiler" + url: "https://github.com/ciderapp/swift-precompiler/actions" + username: GitHub Actions + avatar_url: "https://avatars.githubusercontent.com/u/87914859?s=200&v=4"