Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d5f096033 | |||
| b8dc73a720 | |||
| 27280e8d45 | |||
| 8c5e12960d |
@@ -1,11 +1,10 @@
|
||||
stages:
|
||||
- build-docker
|
||||
- build-binary
|
||||
- build
|
||||
- upload
|
||||
- release
|
||||
|
||||
build-docker:
|
||||
stage: build-docker
|
||||
stage: build
|
||||
only:
|
||||
- tags
|
||||
image: docker:19.03.12
|
||||
@@ -21,7 +20,7 @@ build-docker:
|
||||
- docker push $CI_REGISTRY_IMAGE:latest
|
||||
|
||||
build-binary:
|
||||
stage: build-binary
|
||||
stage: build
|
||||
only:
|
||||
- tags
|
||||
image: golang:1.17.3
|
||||
@@ -32,22 +31,22 @@ build-binary:
|
||||
- ln -s $CI_PROJECT_DIR
|
||||
- cd $CI_PROJECT_NAME
|
||||
script:
|
||||
- CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -o iPilot-${CI_COMMIT_TAG}-darwin-amd64
|
||||
- CGO_ENABLED=0 GOARCH=arm64 GOOS=darwin go build -o iPilot-${CI_COMMIT_TAG}-darwin-arm64
|
||||
- CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o iPilot-${CI_COMMIT_TAG}-linux-amd64
|
||||
- CGO_ENABLED=0 GOARCH=amd64 GOOS=windows go build -o iPilot-${CI_COMMIT_TAG}-win-amd64.exe
|
||||
- CGO_ENABLED=0 GOARCH=386 GOOS=windows go build -o iPilot-${CI_COMMIT_TAG}-win-x86.exe
|
||||
- CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -o bin/iPilot-${CI_COMMIT_TAG}-darwin-amd64
|
||||
- CGO_ENABLED=0 GOARCH=arm64 GOOS=darwin go build -o bin/iPilot-${CI_COMMIT_TAG}-darwin-arm64
|
||||
- CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o bin/iPilot-${CI_COMMIT_TAG}-linux-amd64
|
||||
- CGO_ENABLED=0 GOARCH=amd64 GOOS=windows go build -o bin/iPilot-${CI_COMMIT_TAG}-win-amd64.exe
|
||||
- CGO_ENABLED=0 GOARCH=386 GOOS=windows go build -o bin/iPilot-${CI_COMMIT_TAG}-win-x86.exe
|
||||
artifacts:
|
||||
paths:
|
||||
- bin/
|
||||
|
||||
upload:
|
||||
stage: upload
|
||||
only:
|
||||
- tags
|
||||
image: curlimages/curl:latest
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
before_script:
|
||||
- ls
|
||||
- pwd
|
||||
dependencies:
|
||||
- build-binary
|
||||
script:
|
||||
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file iPilot-${CI_COMMIT_TAG}-darwin-amd64 "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-darwin-amd64"'
|
||||
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file iPilot-${CI_COMMIT_TAG}-darwin-arm64 "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-darwin-arm64"'
|
||||
@@ -57,8 +56,6 @@ upload:
|
||||
|
||||
release:
|
||||
stage: release
|
||||
only:
|
||||
- tags
|
||||
image: registry.gitlab.com/gitlab-org/release-cli:v0.4.0
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
|
||||
Reference in New Issue
Block a user