5 Commits

Author SHA1 Message Date
a10c6f76d3 v1.3.19 2021-11-20 23:11:07 +00:00
5d5f096033 v1.3.18 2021-11-20 23:00:28 +00:00
b8dc73a720 v1.3.17 2021-11-20 22:58:03 +00:00
27280e8d45 v1.3.16 2021-11-20 22:43:06 +00:00
8c5e12960d v1.3.15 2021-11-20 22:41:52 +00:00

View File

@@ -1,11 +1,10 @@
stages: stages:
- build-docker - build
- build-binary
- upload - upload
- release - release
build-docker: build-docker:
stage: build-docker stage: build
only: only:
- tags - tags
image: docker:19.03.12 image: docker:19.03.12
@@ -21,7 +20,7 @@ build-docker:
- docker push $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest
build-binary: build-binary:
stage: build-binary stage: build
only: only:
- tags - tags
image: golang:1.17.3 image: golang:1.17.3
@@ -32,33 +31,34 @@ build-binary:
- ln -s $CI_PROJECT_DIR - ln -s $CI_PROJECT_DIR
- cd $CI_PROJECT_NAME - cd $CI_PROJECT_NAME
script: script:
- CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -o iPilot-${CI_COMMIT_TAG}-darwin-amd64 - 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 iPilot-${CI_COMMIT_TAG}-darwin-arm64 - 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 iPilot-${CI_COMMIT_TAG}-linux-amd64 - 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 iPilot-${CI_COMMIT_TAG}-win-amd64.exe - 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 iPilot-${CI_COMMIT_TAG}-win-x86.exe - CGO_ENABLED=0 GOARCH=386 GOOS=windows go build -o bin/iPilot-${CI_COMMIT_TAG}-win-x86.exe
artifacts:
paths:
- bin/
upload: upload:
stage: upload stage: upload
only:
- tags
image: curlimages/curl:latest image: curlimages/curl:latest
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
dependencies:
- build-binary
before_script: before_script:
- ls - ls
- pwd - pwd
script: 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 bin/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"' - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/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"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file iPilot-${CI_COMMIT_TAG}-linux-amd64 "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-linux-amd64"' - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/iPilot-${CI_COMMIT_TAG}-linux-amd64 "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-linux-amd64"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file iPilot-${CI_COMMIT_TAG}-win-amd64.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-win-amd64.exe"' - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/iPilot-${CI_COMMIT_TAG}-win-amd64.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-win-amd64.exe"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file iPilot-${CI_COMMIT_TAG}-win-x86.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-win-x86.exe"' - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/iPilot-${CI_COMMIT_TAG}-win-x86.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/iPilot/${CI_COMMIT_TAG}/iPilot-${CI_COMMIT_TAG}-win-x86.exe"'
release: release:
stage: release stage: release
only:
- tags
image: registry.gitlab.com/gitlab-org/release-cli:v0.4.0 image: registry.gitlab.com/gitlab-org/release-cli:v0.4.0
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG