github.com/tcncloud/wollemi@v0.8.1/.gitlab-ci.yml (about) 1 stages: 2 - build 3 - deploy 4 build: 5 stage: build 6 image: ubuntu:20.04 7 script: 8 - apt update && apt install -y build-essential xz-utils git wget curl 9 - ./pleasew test -p -v 2 ... 10 - ./pleasew build -p -v 2 //:wollemi 11 - ./pleasew build -a darwin_amd64 -p -v 2 //:wollemi 12 - ./pleasew build -a darwin_arm64 -p -v 2 //:wollemi 13 artifacts: 14 paths: 15 - plz-out/bin/wollemi 16 - plz-out/bin/darwin_amd64/wollemi 17 - plz-out/bin/darwin_arm64/wollemi 18 expire_in: 30mins 19 deploy: 20 stage: deploy 21 image: ubuntu:20.04 22 dependencies: 23 - build 24 only: 25 - tags 26 script: 27 - apt update && apt install -y curl bzip2 28 - curl -Lo - https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz | tar zxf - 29 - mv ghr_v0.13.0_linux_amd64/ghr . 30 - mkdir artifacts 31 - cp plz-out/bin/wollemi artifacts 32 - cd artifacts 33 - tar cjvf wollemi-${CI_COMMIT_TAG}-linux-amd64.tar.gz wollemi 34 - cp ../plz-out/bin/darwin_amd64/wollemi . 35 - tar cjvf wollemi-${CI_COMMIT_TAG}-darwin-amd64.tar.gz wollemi 36 - cp ../plz-out/bin/darwin_arm64/wollemi . 37 - tar cjvf wollemi-${CI_COMMIT_TAG}-darwin-arm64.tar.gz wollemi 38 - rm wollemi 39 - cd .. 40 - ./ghr -t ${GITHUB_TOKEN} -u tcncloud -r wollemi -c ${CI_COMMIT_SHA} -replace ${CI_COMMIT_TAG} ./artifacts/