-
Notifications
You must be signed in to change notification settings - Fork 1
/
codefresh.yml
37 lines (34 loc) · 963 Bytes
/
codefresh.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
34
35
36
37
version: '1.0'
steps:
main_clone:
title: Cloning repository...
type: git-clone
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
create_tag:
title: Push tag to git
image: codefresh/cli
commands:
- export VERSION=$(cat VERSION)
- export OLD_ORIGIN=$(git remote get-url origin)
- git remote rm origin
- git remote add origin https://github:${{GITHUB_TOKEN}}@github.com/codefresh-io/stevedore.git
- git tag v$VERSION
- git push --tags
- git remote rm origin
- git remote add origin $OLD_ORIGIN
when:
branch:
only:
- master
release:
image: goreleaser/goreleaser:v2.4.7
working_directory: /go/src/github.com/codefresh-io/stevedore
volumes:
- ./stevedore:/go/src/github.com/codefresh-io/stevedore
commands:
- goreleaser release -f .goreleaser.yml --clean
when:
branch:
only:
- master