Deadlight Release #19
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: Deadlight Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build binary (${{ matrix.arch }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| platform: linux/amd64 | |
| - arch: arm64 | |
| platform: linux/arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build binary inside Docker | |
| run: | | |
| docker buildx build \ | |
| --platform ${{ matrix.platform }} \ | |
| --build-arg VERSION=${GITHUB_REF_NAME} \ | |
| --output type=local,dest=./output \ | |
| --target export \ | |
| . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: deadlight-linux-${{ matrix.arch }} | |
| path: output/deadlight | |
| release: | |
| name: Publish Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Rename and generate checksums | |
| run: | | |
| mkdir -p release | |
| cp artifacts/deadlight-linux-amd64/deadlight release/deadlight-linux-amd64 | |
| cp artifacts/deadlight-linux-arm64/deadlight release/deadlight-linux-arm64 | |
| cd release | |
| sha256sum deadlight-linux-amd64 deadlight-linux-arm64 > checksums.txt | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| release/deadlight-linux-amd64 | |
| release/deadlight-linux-arm64 | |
| release/checksums.txt |