mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-03 11:53:41 +02:00
.github/workflows/release.yml: build musl linked binaries.
This commit is contained in:
parent
2d6d4e84ff
commit
9a6119ca93
1 changed files with 56 additions and 1 deletions
55
.github/workflows/release.yml
vendored
55
.github/workflows/release.yml
vendored
|
|
@ -59,6 +59,61 @@ jobs:
|
||||||
asset_path: build/bundle.tar.gz
|
asset_path: build/bundle.tar.gz
|
||||||
asset_content_type: application/tar+gzip
|
asset_content_type: application/tar+gzip
|
||||||
|
|
||||||
|
# Build thalos binaries that are linked with musl libc.
|
||||||
|
musl:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
arch: [ 386, amd64, arm, arm64 ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Build musl (${{ matrix.arch }})
|
||||||
|
container:
|
||||||
|
image: golang:1.21-alpine3.19
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: install dependencies
|
||||||
|
run: apk add make
|
||||||
|
|
||||||
|
- name: compile
|
||||||
|
id: compile
|
||||||
|
run: |
|
||||||
|
mkdir -p build/bundle/{bin,logs}
|
||||||
|
GOARCH=${{matrix.arch}} make -e DESTDIR=build/bundle PREFIX= CFGDIR= install install-scripts
|
||||||
|
tar -C build/bundle -z -cf build/bundle.tar.gz .
|
||||||
|
echo "version=$(sed -n 's/.*PROGRAM_VERSION\s*=\s*//p' Makefile)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Upload thalos-server
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_name: thalos-server-${{steps.compile.outputs.version}}-linux-${{matrix.arch}}-musl
|
||||||
|
asset_path: build/thalos-server
|
||||||
|
asset_content_type: application/octal-stream
|
||||||
|
|
||||||
|
- name: Upload thalos-tools
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
|
asset_name: thalos-tools-${{steps.compile.outputs.version}}-linux-${{matrix.arch}}-musl
|
||||||
|
asset_path: build/thalos-tools
|
||||||
|
asset_content_type: application/octal-stream
|
||||||
|
|
||||||
|
- 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: thalos-${{steps.compile.outputs.version}}-linux-${{matrix.arch}}-musl.tar.gz
|
||||||
|
asset_path: build/bundle.tar.gz
|
||||||
|
asset_content_type: application/tar+gzip
|
||||||
|
|
||||||
|
|
||||||
package-ubuntu:
|
package-ubuntu:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue