-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
33 lines (31 loc) · 1.01 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
build::puller:
image: golang:1.19.1
stage: build
before_script:
- curl https://get.please.build | bash
script:
- ./pleasew build
- ./pleasew build --arch=linux_amd64 tools
- ./pleasew build --arch=darwin_amd64 tools
- ./pleasew build --arch=darwin_arm64 tools
- mkdir -p dist
- cp $(./pleasew query outputs --arch=linux_amd64 tools) dist/
- cp $(./pleasew query outputs --arch=darwin_amd64 tools) dist/
- cp $(./pleasew query outputs --arch=darwin_arm64 tools) dist/
artifacts:
paths:
- dist
expire_in: 24 hours
deploy:
stage: deploy
image: ubuntu:20.04
dependencies:
- build::puller
only:
- tags
before_script:
- apt update && apt install -y curl bzip2
- curl -Lo - https://github.com/tcnksm/ghr/releases/download/v0.16.0/ghr_v0.16.0_linux_amd64.tar.gz | tar zxf -
- mv ghr_v0.16.0_linux_amd64/ghr . && rm -rf ghr_v0.16.0_linux_amd64
script:
- ./ghr -u tcncloud -r please.containers -t ${GITHUB_TOKEN} -replace $CI_COMMIT_TAG dist