chore: update ci and stop publishing on crates.io #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Package | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar czf ../../../stackpit-${{ matrix.target }}.tar.gz stackpit | |
| cd ../../.. | |
| shasum -a 256 stackpit-${{ matrix.target }}.tar.gz > stackpit-${{ matrix.target }}.tar.gz.sha256 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: stackpit-${{ matrix.target }} | |
| path: | | |
| stackpit-${{ matrix.target }}.tar.gz | |
| stackpit-${{ matrix.target }}.tar.gz.sha256 | |
| deb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-deb | |
| run: cargo install cargo-deb | |
| - name: Build deb package | |
| run: cargo deb | |
| - name: Upload deb artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: stackpit-deb | |
| path: target/debian/*.deb | |
| rpm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-generate-rpm | |
| run: cargo install cargo-generate-rpm | |
| - name: Build | |
| run: cargo build --release | |
| - name: Build rpm package | |
| run: cargo generate-rpm | |
| - name: Upload rpm artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: stackpit-rpm | |
| path: target/generate-rpm/*.rpm | |
| release: | |
| needs: [build, deb, rpm] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| merge-multiple: true | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| draft: false | |
| files: | | |
| stackpit-*.tar.gz | |
| stackpit-*.tar.gz.sha256 | |
| *.deb | |
| *.rpm |