diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..afea162 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,46 @@ +on: + push: + tags: [ 'v*.*.*' ] + +jobs: + release: + name: Release - ${{ matrix.platform.release_for }} + strategy: + matrix: + platform: + - os_name: Windows-x86_64 + os: windows-latest + target: x86_64-pc-windows-msvc + skip_tests: true + + - os_name: Linux-x86_64 + os: ubuntu-20.04 + target: x86_64-unknown-linux-musl + + - os_name: macOS-x86_64 + os: macOS-latest + target: x86_64-apple-darwin + + - os_name: macOS-aarch64 + os: macOS-latest + target: aarch64-apple-darwin + + runs-on: ${{ matrix.platform.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build binary + uses: houseabsolute/actions-rust-cross@v0 + with: + command: ${{ matrix.platform.command }} + target: ${{ matrix.platform.target }} + args: "--locked --release" + strip: true + + - name: Publish artifacts and release + uses: houseabsolute/actions-rust-release@v0 + with: + target: ${{ matrix.platform.target }} + executable-name: 'uv-migrator' + if: matrix.toolchain == 'stable' \ No newline at end of file