From 9d2ea711775d8a5a08495385365dd595e9bed58b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 19 Jun 2023 17:10:22 +0200 Subject: [PATCH] .github/workflows/release.yml: also create a tar file with the binary and config files. --- .github/workflows/release.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f3d8cb..944211e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,9 @@ jobs: - name: compile id: compile run: | - GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} make + mkdir -p build/bundle/{bin,logs} + GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} make -e DESTDIR=$INSTALL_DIR PREFIX= CFGDIR= install install-scripts + tar -C build/bundle -z -cf build/bundle.tar.gz . FILE=$(find build -type f | head -1) echo "version=$(sed -n 's/.*PROGRAM_VERSION\s*=\s*//p' Makefile)" >> "$GITHUB_OUTPUT" echo "filename=$FILE" >> "$GITHUB_OUTPUT" @@ -41,6 +43,16 @@ jobs: asset_path: ${{ steps.compile.outputs.filename }} asset_content_type: ${{ steps.compile.outputs.mime }} + - name: Upload bundle + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_name: ${{ steps.compile.outputs.name }}-${{steps.compile.outputs.version}}-${{matrix.os}}-${{matrix.arch}}.tar.gz + asset_path: build/bundle.tar.gz + asset_content_type: application/tar+gzip + package-ubuntu: strategy: fail-fast: false