Show fabric build version #6
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: | |
| name: build ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| os: macos-14 | |
| builder: cargo | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-24.04 | |
| builder: cargo | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-24.04 | |
| builder: cross | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross | |
| if: matrix.builder == 'cross' | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cross | |
| - name: Build | |
| run: ${{ matrix.builder }} build --release --target ${{ matrix.target }} | |
| - name: Package | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p dist/package | |
| cp "target/${{ matrix.target }}/release/fabric" dist/package/fabric | |
| chmod 755 dist/package/fabric | |
| tar -czf "dist/fabric-${{ matrix.target }}.tar.gz" -C dist/package fabric | |
| if command -v shasum >/dev/null 2>&1; then | |
| shasum -a 256 "dist/fabric-${{ matrix.target }}.tar.gz" > "dist/fabric-${{ matrix.target }}.tar.gz.sha256" | |
| else | |
| sha256sum "dist/fabric-${{ matrix.target }}.tar.gz" > "dist/fabric-${{ matrix.target }}.tar.gz.sha256" | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: fabric-${{ matrix.target }} | |
| path: dist/* | |
| release: | |
| name: publish release | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* |