name: Release on: push: tags: - "v*" permissions: contents: write jobs: build: strategy: matrix: include: - os: ubuntu-latest target: x86_64-unknown-linux-gnu artifact: vulp-linux-x86_64 - os: windows-latest target: x86_64-pc-windows-msvc artifact: vulp-windows-x86_64.exe runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - uses: Swatinem/rust-cache@v2 - name: Build run: cargo build --release --target ${{ matrix.target }} - name: Stage artifact (Unix) if: runner.os != 'Windows' run: | mkdir -p dist cp target/${{ matrix.target }}/release/vulp dist/${{ matrix.artifact }} - name: Stage artifact (Windows) if: runner.os == 'Windows' shell: pwsh run: | New-Item -ItemType Directory -Force -Path dist Copy-Item target/${{ matrix.target }}/release/vulp.exe dist/${{ matrix.artifact }} - uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact }} path: dist/${{ matrix.artifact }} release: needs: build runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 with: path: dist merge-multiple: true - uses: softprops/action-gh-release@v2 with: files: dist/* generate_release_notes: true