From 5d3255b26f27a85d042737bb0ab9abd41e28d5e9 Mon Sep 17 00:00:00 2001 From: zachmann <gabriel.zachmann@kit.edu> Date: Thu, 3 Nov 2022 14:23:54 +0100 Subject: [PATCH] [ci] improve release/prerelease --- .gitlab-ci-scripts/upload.sh | 4 ++++ .gitlab-ci.yml | 1 - .goreleaser-release.yml | 22 +++++++++++++--------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci-scripts/upload.sh b/.gitlab-ci-scripts/upload.sh index 5134fc90..45ecda41 100755 --- a/.gitlab-ci-scripts/upload.sh +++ b/.gitlab-ci-scripts/upload.sh @@ -1,3 +1,7 @@ + +#REPO_TARGET="$(if echo $CI_COMMIT_TAG | grep -q '-'; then echo '/'; else echo '/prerel'; fi)" +REPO_TARGET="/prerel" + # ssh-key-script [ -e /tmp/ssh-private-keys/${REPO_USER} ] && { eval $(ssh-agent -s) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a330124..0fdd5b40 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,6 @@ prerelease: GIT_DEPTH: 0 REPO_HOST: repo.data.kit.edu REPO_USER: cicd - REPO_TARGET: /prerel script: - .gitlab-ci-scripts/goreleaser.sh - .gitlab-ci-scripts/upload.sh diff --git a/.goreleaser-release.yml b/.goreleaser-release.yml index a2b1c0cc..61e18305 100644 --- a/.goreleaser-release.yml +++ b/.goreleaser-release.yml @@ -11,8 +11,8 @@ builds: - CGO_ENABLED=0 goos: - linux - gcflags: - - all=-trimpath={{.Env.GOPATH}} + flags: + - -trimpath mod_timestamp: '{{ .CommitTimestamp }}' - id: setup main: ./cmd/mytoken-server/mytoken-setup @@ -21,8 +21,8 @@ builds: - CGO_ENABLED=0 goos: - linux - gcflags: - - all=-trimpath={{.Env.GOPATH}} + flags: + - -trimpath mod_timestamp: '{{ .CommitTimestamp }}' - id: migratedb main: ./cmd/mytoken-server/mytoken-migratedb @@ -31,8 +31,8 @@ builds: - CGO_ENABLED=0 goos: - linux - gcflags: - - all=-trimpath={{.Env.GOPATH}} + flags: + - -trimpath mod_timestamp: '{{ .CommitTimestamp }}' archives: - replacements: @@ -50,7 +50,7 @@ nfpms: file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}" builds: - server - homepage: https://mytoken-doc.data.kit.edu/server/intro + homepage: https://mytoken-docs.data.kit.edu/server maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu> description: Mytoken is a central web service with the goal to easily obtain OpenID Connect access tokens across devices. license: MIT @@ -80,7 +80,7 @@ nfpms: file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}" builds: - setup - homepage: https://mytoken-doc.data.kit.edu/server/intro + homepage: https://mytoken-docs.data.kit.edu/server maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu> description: A setup utility for the mytoken-server license: MIT @@ -102,7 +102,7 @@ nfpms: file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}" builds: - migratedb - homepage: https://mytoken-doc.data.kit.edu/server/intro + homepage: https://mytoken-docs.data.kit.edu/server maintainer: Gabriel Zachmann <gabriel.zachmann@kit.edu> description: A tool for migrating the database between versions license: MIT @@ -173,7 +173,11 @@ checksum: snapshot: name_template: "{{ .Tag }}-next" release: + prerelease: auto draft: true + github: + owner: oidc-mytoken + name: server name_template: "{{.ProjectName}} {{.Version}}" changelog: sort: asc -- GitLab