|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + arch: [amd64, arm64] |
| 17 | + steps: |
| 18 | + - name: Checkout phiola |
| 19 | + uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + fetch-depth: 0 |
| 22 | + |
| 23 | + - name: Get the dependencies |
| 24 | + run: | |
| 25 | + git clone --depth=1 https://github.com/stsaz/netmill ../netmill |
| 26 | + git clone --depth=1 https://github.com/stsaz/avpack ../avpack |
| 27 | + git clone --depth=1 https://github.com/stsaz/ffaudio ../ffaudio |
| 28 | + git clone --depth=1 https://github.com/stsaz/ffpack ../ffpack |
| 29 | + git clone --depth=1 https://github.com/stsaz/ffgui ../ffgui |
| 30 | + git clone --depth=1 https://github.com/stsaz/ffsys ../ffsys |
| 31 | + git clone --depth=1 https://github.com/stsaz/ffbase ../ffbase |
| 32 | +
|
| 33 | + - name: Create builder image |
| 34 | + run: | |
| 35 | + if [[ "${{ matrix.arch }}" == "amd64" ]]; then |
| 36 | + podman build -t phiola-amd64-builder -f builder/Dockerfile.linux-amd64 . |
| 37 | + else |
| 38 | + podman build -t phiola-arm64-builder -f builder/Dockerfile.linux-arm64 . |
| 39 | + fi |
| 40 | +
|
| 41 | + - name: Build for ${{ matrix.arch }} |
| 42 | + run: | |
| 43 | + podman run --rm \ |
| 44 | + -v $(pwd)/..:/src:Z \ |
| 45 | + -w /src/phiola \ |
| 46 | + phiola-${{ matrix.arch }}-builder \ |
| 47 | + bash builder/build.sh ${{ matrix.arch }} '${{ github.ref_name }}' |
| 48 | +
|
| 49 | + - name: Upload artifacts |
| 50 | + uses: actions/upload-artifact@v4 |
| 51 | + with: |
| 52 | + name: phiola-${{ matrix.arch }} |
| 53 | + path: | |
| 54 | + _linux-${{ matrix.arch }}/phiola_*.deb |
| 55 | + _linux-${{ matrix.arch }}/phiola-*.rpm |
| 56 | + _linux-${{ matrix.arch }}/phiola-*.tar.zst |
| 57 | +
|
| 58 | + release: |
| 59 | + needs: build |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - name: Checkout phiola |
| 63 | + uses: actions/checkout@v4 |
| 64 | + with: |
| 65 | + fetch-depth: 0 |
| 66 | + |
| 67 | + - name: Download all artifacts |
| 68 | + uses: actions/download-artifact@v4 |
| 69 | + with: |
| 70 | + path: artifacts |
| 71 | + |
| 72 | + - name: Generate release notes |
| 73 | + run: | |
| 74 | + bash builder/release-notes.sh '${{ github.ref_name }}' |
| 75 | +
|
| 76 | + - name: Create GitHub Release |
| 77 | + uses: softprops/action-gh-release@v2 |
| 78 | + with: |
| 79 | + files: | |
| 80 | + artifacts/phiola-amd64/*.deb |
| 81 | + artifacts/phiola-amd64/*.rpm |
| 82 | + artifacts/phiola-amd64/*.tar.zst |
| 83 | + artifacts/phiola-arm64/*.deb |
| 84 | + artifacts/phiola-arm64/*.rpm |
| 85 | + artifacts/phiola-arm64/*.tar.zst |
| 86 | + draft: true |
| 87 | + body_file: release-notes.txt |
0 commit comments