From c96c6d0afaf11bba3a881b7f712d543637aa91a8 Mon Sep 17 00:00:00 2001 From: PatrykHegenberg <112555272+PatrykHegenberg@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:16:39 +0200 Subject: [PATCH] Create publish.yml --- .github/workflows/publish.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..654741c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,49 @@ +name: Publish + +on: + push: + tags: + - '*' + +jobs: + publish: + name: Publish for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + name: [ + linux, + windows, + macos + ] + + include: + - name: linux + os: ubuntu-latest + artifact_name: target/release/ + asset_name: caesar-linux + - name: windows + os: windows-latest + artifact_name: target/release/.exe + asset_name: caesar-windows + - name: macos + os: macos-latest + artifact_name: target/release/ + asset_name: caesar-macos + + steps: + - uses: actions/checkout@v1 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + + - name: Build + run: cargo build --release --locked + + - name: Upload binaries to release + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.asset_name }} + path: ${{ matrix.artifact_name }}