CGGItemSets/.woodpecker/.linux.yml
nyyu 242dbffb49
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/linux Pipeline was successful
ci/woodpecker/push/mingw Pipeline was successful
chore(ci): secrets
2024-12-14 09:54:44 +01:00

36 lines
1.3 KiB
YAML

steps:
build:
image: rust:alpine
pull: true
commands:
- apk add --no-cache musl-dev
- rustup component add clippy
- cargo test
- cargo clippy
- cargo build --release
- strip target/release/cggitem_sets
when:
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [ manual, tag ]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
deploy:
image: alpine:3.21
pull: true
commands:
- apk add --no-cache curl
- curl -f -i -u $REGISTRY_USERNAME:$REGISTRY_PASSWORD -X POST 'https://nexus.nyyu.dev/service/rest/v1/components?repository=maven-releases' -F maven2.groupId=dev.nyyu -F maven2.artifactId=cggitem_sets -F maven2.version=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml) -F maven2.asset1=@target/release/cggitem_sets -F maven2.asset1.extension=elf -F maven2.asset1.classifier=linux-x64
environment:
REGISTRY_USERNAME:
from_secret: registry_username
REGISTRY_PASSWORD:
from_secret: registry_password
when:
path:
include: [ '.woodpecker/*.yml', 'src/*', 'Cargo*' ]
event: [ push, manual, tag ]
branch:
- ${CI_REPO_DEFAULT_BRANCH}