22 lines
904 B
YAML
22 lines
904 B
YAML
pipeline:
|
|
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
|
|
deploy:
|
|
image: alpine:latest
|
|
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
|
|
secrets: [registry_username, registry_password]
|
|
when:
|
|
event: [ push, manual, tag ]
|
|
branch:
|
|
- master
|