Deploy only when master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fc98ebb169
commit
f89c3b5268
1 changed files with 9 additions and 1 deletions
10
.drone.yml
10
.drone.yml
|
@ -6,16 +6,24 @@ steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: rust:alpine
|
image: rust:alpine
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache mingw-w64-gcc musl-dev curl
|
- apk add --no-cache mingw-w64-gcc musl-dev
|
||||||
- mkdir ~/.cargo
|
- mkdir ~/.cargo
|
||||||
- echo -e '[target.x86_64-pc-windows-gnu]\nlinker = "x86_64-w64-mingw32-gcc"\nar = "x86_64-w64-mingw32-gcc-ar"' > ~/.cargo/config
|
- echo -e '[target.x86_64-pc-windows-gnu]\nlinker = "x86_64-w64-mingw32-gcc"\nar = "x86_64-w64-mingw32-gcc-ar"' > ~/.cargo/config
|
||||||
- rustup toolchain install stable-x86_64-pc-windows-gnu
|
- rustup toolchain install stable-x86_64-pc-windows-gnu
|
||||||
- rustup target add x86_64-pc-windows-gnu
|
- rustup target add x86_64-pc-windows-gnu
|
||||||
- rustup component add clippy
|
- rustup component add clippy
|
||||||
- cargo clippy
|
- cargo clippy
|
||||||
|
- cargo clippy --target x86_64-pc-windows-gnu
|
||||||
- cargo build --release --target x86_64-pc-windows-gnu
|
- cargo build --release --target x86_64-pc-windows-gnu
|
||||||
- strip target/x86_64-pc-windows-gnu/release/cggitem_sets.exe
|
- strip target/x86_64-pc-windows-gnu/release/cggitem_sets.exe
|
||||||
|
- name: deploy
|
||||||
|
image: alpine:latest
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache curl
|
||||||
- curl -u drone:$MVN_PWD -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)-$(date +%Y%m%d%H%M%S) -F maven2.asset1=@target/x86_64-pc-windows-gnu/release/cggitem_sets.exe -F maven2.asset1.extension=exe
|
- curl -u drone:$MVN_PWD -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)-$(date +%Y%m%d%H%M%S) -F maven2.asset1=@target/x86_64-pc-windows-gnu/release/cggitem_sets.exe -F maven2.asset1.extension=exe
|
||||||
environment:
|
environment:
|
||||||
MVN_PWD:
|
MVN_PWD:
|
||||||
from_secret: maven_password
|
from_secret: maven_password
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
Loading…
Add table
Reference in a new issue