Skip to content

Commit 363f98d

Browse files
caarlos0troian
andauthored
ci: use goreleaser (#116)
* ci: use goreleaser Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: cleanup Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: expand image tags Signed-off-by: Artur Troian <troian@users.noreply.github.com> * ci: add env load step Signed-off-by: Artur Troian <troian@users.noreply.github.com> --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> Signed-off-by: Artur Troian <troian@users.noreply.github.com> Co-authored-by: Artur Troian <troian@users.noreply.github.com>
1 parent 2a0139a commit 363f98d

19 files changed

+142
-1159
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ GORELEASER_VERSION=2.13.3
55
DEBIAN_FRONTEND=noninteractive
66
TINI_VERSION=v0.19.0
77
COSIGN_VERSION=2.5.3
8+
GO111MODULE=on

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dotenv .env

.github/workflows/dispatch.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/goreleaser-bump.yaml

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
workflow_dispatch:
66
inputs:
77
tag:
8+
description: "GoReleaser version tag (e.g., v2.13.2)"
9+
required: true
810

911
jobs:
1012
goreleaser-bump:
@@ -16,67 +18,21 @@ jobs:
1618
fetch-depth: 0
1719
token: ${{ secrets.GITHUB_TOKEN }}
1820
persist-credentials: true
21+
1922
- run: git checkout master
23+
2024
- name: Setup git config
2125
run: |
2226
git config --global user.name github-actions
2327
git config --global user.email "github-actions@github.com"
24-
- name: Setup env
25-
uses: c-py/action-dotenv-to-setenv@v5
26-
with:
27-
env-file: .env
28-
- name: Goreleaser version
29-
run: |
30-
GORELEASER_VER=${{ github.event.inputs.tag }}
31-
echo "GORELEASER_VER=${GORELEASER_VER#v}" >> $GITHUB_ENV
32-
- name: set new version
28+
29+
- name: Update version in .goreleaser.yaml
3330
run: |
34-
sed -i -e "s/GORELEASER_VERSION=${{ env.GORELEASER_VERSION }}/GORELEASER_VERSION=${{ env.GORELEASER_VER }}/g" .env
31+
sed -i -e "s/GORELEASER_VERSION=.*/GORELEASER_VERSION=${{ github.event.inputs.tag }}/g" .env
32+
3533
- name: Commit new version
3634
run: |
3735
if git add .env > /dev/null 2>&1; then
38-
git commit -m "feat: bump goreleaser to v${{ env.GORELEASER_VER }}"
36+
git commit -m "feat: bump goreleaser to v${{ github.event.inputs.tag }}"
3937
git push origin master
4038
fi
41-
notify-goreleaser-bump:
42-
runs-on: ubuntu-latest
43-
needs:
44-
- goreleaser-bump
45-
steps:
46-
- name: Checkout code
47-
uses: actions/checkout@v6
48-
with:
49-
fetch-depth: 0
50-
- name: Setup env
51-
uses: c-py/action-dotenv-to-setenv@v5
52-
with:
53-
env-file: .env
54-
- name: Get version
55-
run: |
56-
echo "RELEASE_TAG=v${GO_VERSION}" >> $GITHUB_ENV
57-
- name: Notify goreleaser-cross with new release
58-
uses: benc-uk/workflow-dispatch@v1
59-
with:
60-
workflow: goreleaser
61-
inputs: '{ "tag" : "${{ env.RELEASE_TAG }}" }'
62-
notify-goreleaser-pro-bump:
63-
runs-on: ubuntu-latest
64-
needs:
65-
- goreleaser-bump
66-
steps:
67-
- name: Checkout code
68-
uses: actions/checkout@v6
69-
with:
70-
fetch-depth: 0
71-
- name: Setup env
72-
uses: c-py/action-dotenv-to-setenv@v5
73-
with:
74-
env-file: .env
75-
- name: Get version
76-
run: |
77-
echo "RELEASE_TAG=v${GO_VERSION}" >> $GITHUB_ENV
78-
- name: Notify goreleaser-cross-pro with new release
79-
uses: benc-uk/workflow-dispatch@v1
80-
with:
81-
workflow: goreleaser-pro
82-
inputs: '{ "tag" : "${{ env.RELEASE_TAG }}" }'

.github/workflows/release-base.yaml

Lines changed: 0 additions & 155 deletions
This file was deleted.

.github/workflows/release-goreleaser-pro.yaml

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)