mirror of
https://git.madhouse-project.org/algernon/iocaine.git
synced 2025-02-13 05:06:19 +01:00
ci: build & publish a static binary too
Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
parent
ddd948171c
commit
ca1a3eb22a
1 changed files with 52 additions and 1 deletions
|
@ -19,7 +19,7 @@ on:
|
||||||
- 'templates/**'
|
- 'templates/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
binary:
|
||||||
runs-on: nixos-latest
|
runs-on: nixos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
|
@ -36,6 +36,57 @@ jobs:
|
||||||
logs: true
|
logs: true
|
||||||
package: iocaine
|
package: iocaine
|
||||||
|
|
||||||
|
binary-static:
|
||||||
|
runs-on: nixos-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: setup magic attic cache
|
||||||
|
uses: actions/magic-attic-cache@main
|
||||||
|
with:
|
||||||
|
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
uses: actions/nix/build@main
|
||||||
|
with:
|
||||||
|
logs: true
|
||||||
|
package: iocaine-static
|
||||||
|
|
||||||
|
- name: compress the binary
|
||||||
|
uses: actions/nix/develop@main
|
||||||
|
with:
|
||||||
|
run: |
|
||||||
|
zstd result/bin/iocaine
|
||||||
|
|
||||||
|
- name: determine the version
|
||||||
|
uses: actions/nix/develop@main
|
||||||
|
id: ver
|
||||||
|
with:
|
||||||
|
run: |
|
||||||
|
echo "ver=$(cargo info -q iocaine | grep "^version:" | cut -d " " -f 2)" >>"${GITHUB_OUTPUT}""
|
||||||
|
|
||||||
|
- name: upload package
|
||||||
|
uses: actions/nix/develop@main
|
||||||
|
with:
|
||||||
|
run: |
|
||||||
|
curl --user :${{ secrets.DOCKER_PASSWORD }} -XDELETE \
|
||||||
|
https://git.madhouse-project.org/api/packages/algernon/generic/iocaine/${{ steps.ver.outputs.ver }}
|
||||||
|
curl --user :${{ secrets.DOCKER_PASSWORD }} \
|
||||||
|
--upload-file result/bin/iocaine.zstd \
|
||||||
|
https://git.madhouse-project.org/api/packages/algernon/generic/iocaine/${{ steps.ver.outputs.ver }}/iocaine.zstd
|
||||||
|
|
||||||
|
container:
|
||||||
|
runs-on: nixos-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: setup magic attic cache
|
||||||
|
uses: actions/magic-attic-cache@main
|
||||||
|
with:
|
||||||
|
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
- name: build the container image
|
- name: build the container image
|
||||||
uses: actions/nix/build@main
|
uses: actions/nix/build@main
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue