From a8062f0671cdf906992b34d732873c96ff9a2c91 Mon Sep 17 00:00:00 2001 From: Marius Bancila Date: Wed, 12 Aug 2026 17:12:06 +0300 Subject: [PATCH] added header attachment to releases --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..71e7837 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +# croncpp is a single header, and the source archives GitHub attaches to a +# release on its own bury it inside a directory. Attach the header itself so +# that it can be downloaded directly, as earlier releases did by hand. + +on: + release: + types: [published] + +jobs: + attach-header: + name: Attach croncpp.h + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + + - name: Attach the header to the release + run: gh release upload "${{ github.event.release.tag_name }}" include/croncpp.h --clobber + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }}