-
Notifications
You must be signed in to change notification settings - Fork 22
37 lines (35 loc) · 1.15 KB
/
price-feeder-release.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
# This workflow helps with creating docker images.
# This job will only be triggered when a tag (vX.X.x) is pushed
name: Release price-feeder
on:
push:
tags:
- "v*.*.*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: 1.19
cache: true
cache-dependency-path: go.sum
# Parse 'v*.*.*' semantic version from 'v*.*.*' and save to
# the $GITHUB_ENV environment variable.
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
# Note, we have to pin to v0.179.0 due to newer releases enforcing
# correct semantic versioning even when '--skip-validate' is provided.
#
# Ref: https://github.com/goreleaser/goreleaser/pull/2503
version: v0.179.0
args: release --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ env.RELEASE_VERSION }}