From: Michael Brown Date: Fri, 20 Feb 2026 15:14:42 +0000 (+0000) Subject: [ci] Add a job to automatically create releases X-Git-Tag: v2.0.0~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0854850d02b7100e7adc02c8731032cd392aa366;p=thirdparty%2Fipxe.git [ci] Add a job to automatically create releases Add a job that will automatically create a (draft) release for any suitable tag, using the build artifacts and release notes already constructed by earlier jobs. Minimise the logic within the release job itself, since by definition it cannot be tested on every commit. Signed-off-by: Michael Brown --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d175be7f4..1cd1376ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -522,7 +522,8 @@ jobs: - name: Build working-directory: src run: | - make ${{ env.bindir }}/version.txt \ + make REPOURL=${{ github.server_url }}/${{ github.repository }} \ + ${{ env.bindir }}/version.txt \ ${{ env.bindir }}/relname.txt \ ${{ env.bindir }}/reltitle.txt \ ${{ env.bindir }}/relnotes.md @@ -579,3 +580,43 @@ jobs: run: | gh workflow run build.yml -f run_id=${{ github.run_id }} echo "Results at ${{ env.workflow_url }}" + + release: + name: Release + runs-on: ubuntu-latest + needs: + - bios + - sbi + - uefi + - sbsign + - linux + - shim + - combine + - netboot + - version + if: >- + startsWith ( github.ref, 'refs/tags/v' ) + steps: + + - name: Download + uses: actions/download-artifact@v7 + with: + pattern: "{bin-combi,netboot,version}" + + - name: Tag check + run: | + RELNAME=$(cat version/relname.txt) + if [ "${{ github.ref_name }}" != "${RELNAME}" ] ; then + echo "ERROR: Tag does not match release name ${RELNAME}" >&2 + exit 1 + fi + + - name: Release + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "${{ github.ref_name }}" --verify-tag --draft \ + --title "$(cat version/relname.txt)" \ + --notes-file version/relnotes.md \ + bin-combi/ipxe.iso bin-combi/ipxe.usb netboot/ipxeboot.tar.gz