-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.15 KB
/
release.yaml
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
38
39
40
name: release
on:
push:
branches:
- main
pull_request:
env:
# Default minimum version of Go to support.
DEFAULT_GO_VERSION: 1.21
jobs:
release:
runs-on: [ubuntu-latest]
steps:
- name: Get version
id: vars
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Clone envs from gitlab
run: |
git clone https://gitlab-ci-token:${{ secrets.GITLAB_CR_PAT }}@gitlab.com/target-digital-transformation/environment-store.git .
git checkout ${{ steps.vars.outputs.version }}
git remote set-url origin [email protected]:tespkg/enva-release
- name: Set up Go
uses: actions/setup-go@v5
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - uses: goreleaser/goreleaser-action@v2
# with:
# version: latest
# args: --snapshot --rm-dist