From 307108dafdb23c7ca61504b6a15b71b9da62cf21 Mon Sep 17 00:00:00 2001 From: prsabahrami Date: Mon, 6 Jan 2025 11:47:09 -0500 Subject: [PATCH] Added release yaml --- .github/workflows/release.yml | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7495190 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Release Build + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + target: + - x86_64-unknown-linux-gnu + - x86_64-pc-windows-gnu + - x86_64-apple-darwin + - aarch64-apple-darwin + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.target }} + override: true + + - name: Install Dependencies + run: rustup target add ${{ matrix.target }} + + - name: Build + run: cargo build --release --target ${{ matrix.target }} + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: shell-${{ matrix.target }} + path: target/${{ matrix.target }}/release/shell + + release: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Upload to Release + uses: softprops/action-gh-release@v1 + with: + files: | + **/shell-x86_64-unknown-linux-gnu + **/shell-x86_64-pc-windows-gnu.exe + **/shell-x86_64-apple-darwin + **/shell-aarch64-apple-darwin + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}