Skip to content

Commit

Permalink
Update release-alpine.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Jun 28, 2024
1 parent 65e46bc commit 52da1dd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/release-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- uses: actions/checkout@v4
- name: Set up Alpine Linux for x86_64 (build arch)
uses: jirutka/setup-alpine@v1
with:
arch: x86_64
arch: ${{ matrix.arch }}
id: alpine-root
packages: >
build-base
Expand All @@ -32,29 +35,29 @@ jobs:
go
sudo
- name: Install LuaJit 2.1
- name: Install LuaJit 2.1 ${{ matrix.arch }}
run: |
git clone https://luajit.org/git/luajit-2.0.git \
&& cd luajit-2.0 \
&& git checkout v2.1 \
&& make CCOPT="-static -fPIC" BUILDMODE="static" && sudo make install
shell: alpine.sh {0}

- name: Build
run: CGO_ENABLED=1 GOOS=linux go build -a --ldflags '-linkmode external -extldflags "-static -s -w"' -o heplify .
- name: Build ${{ matrix.arch }}
run: CGO_ENABLED=1 GOOS=linux go build -a --ldflags '-linkmode external -extldflags "-static -s -w"' -o heplify-${{ matrix.arch }} .
shell: alpine.sh {0}

- name: Try to run the binary
run: ./heplify -h
- name: Try to run the binary ${{ matrix.arch }}
run: ./heplify-${{ matrix.arch }} -h
shell: alpine.sh {0}

- name: Upload
- name: Upload ${{ matrix.arch }}
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'heplify'
args: 'heplify-${{ matrix.arch }}'

docker-push:
if: ${{ github.event_name != 'workflow_dispatch' }}
Expand Down

0 comments on commit 52da1dd

Please sign in to comment.