v1.3.17
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
stages:
|
||||
- build-docker
|
||||
- build-binary
|
||||
- build
|
||||
- build
|
||||
- upload
|
||||
- release
|
||||
|
||||
build-docker:
|
||||
stage: build-docker
|
||||
build docker:
|
||||
stage: build
|
||||
only:
|
||||
- tags
|
||||
image: docker:19.03.12
|
||||
@@ -20,8 +20,8 @@ build-docker:
|
||||
- docker push $IMAGE_TAG
|
||||
- docker push $CI_REGISTRY_IMAGE:latest
|
||||
|
||||
build-binary:
|
||||
stage: build-binary
|
||||
build binary:
|
||||
stage: build
|
||||
only:
|
||||
- tags
|
||||
image: golang:1.17.3
|
||||
@@ -32,20 +32,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
|
||||
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"'
|
||||
|
||||
Reference in New Issue
Block a user