Skip to content

Commit

Permalink
.github/workflows/release.yml: also create a tar file with the binary…
Browse files Browse the repository at this point in the history
… and config files.
  • Loading branch information
pnx committed Jun 19, 2023
1 parent 0c0b8a3 commit 9d2ea71
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 9d2ea71

Please sign in to comment.