40 lines
968 B
YAML
40 lines
968 B
YAML
depends_on:
|
|
- test
|
|
|
|
when:
|
|
- event: push
|
|
branch:
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
matrix:
|
|
BUILD_TARGET:
|
|
- x86_64-linux
|
|
- aarch64-linux
|
|
|
|
steps:
|
|
build:
|
|
image: git.nikos.gg/prymn/images/nix:89bb1c18
|
|
secrets: [ ATTIC_SECRET ]
|
|
commands:
|
|
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
|
- attic login local http://172.17.0.1:8080/ "$${ATTIC_SECRET}"
|
|
- attic use prymn
|
|
- nix build -L ".#agent-${BUILD_TARGET}"
|
|
- attic push prymn ./result
|
|
- mkdir -p "dist/${BUILD_TARGET}"
|
|
- cp result/bin/prymn_agent "dist/${BUILD_TARGET}/"
|
|
|
|
release:
|
|
image: woodpeckerci/plugin-s3
|
|
settings:
|
|
bucket: prymn-static
|
|
region: auto
|
|
endpoint:
|
|
from_secret: R2_STATIC_ADDRESS
|
|
access_key:
|
|
from_secret: R2_DEPLOY_ACCESS_KEY
|
|
secret_key:
|
|
from_secret: R2_DEPLOY_SECRET_KEY
|
|
source: dist/**/*
|
|
target: /agent
|
|
strip_prefix: dist/
|