-
-
Notifications
You must be signed in to change notification settings - Fork 25
81 lines (79 loc) · 2.31 KB
/
goreleaser-bump.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: goreleaser-bump
on:
workflow_dispatch:
inputs:
tag:
jobs:
goreleaser-bump:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true
- run: git checkout master
- name: Setup git config
run: |
git config --global user.name github-actions
git config --global user.email "[email protected]"
- name: Setup env
uses: c-py/action-dotenv-to-setenv@v3
with:
env-file: .env
- name: Goreleaser version
run: |
GORELEASER_VER=${{ github.event.inputs.tag }}
echo "GORELEASER_VER=${GORELEASER_VER#v}" >> $GITHUB_ENV
- name: set new version
run: |
sed -i -e "s/GORELEASER_VERSION=${{ env.GORELEASER_VERSION }}/GORELEASER_VERSION=${{ env.GORELEASER_VER }}/g" .env
- name: Commit new version
run: |
if git add .env > /dev/null 2>&1; then
git commit -m "feat: bump goreleaser to v${{ env.GORELEASER_VER }}"
git push origin master
fi
notify-goreleaser-bump:
runs-on: ubuntu-latest
needs:
- goreleaser-bump
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup env
uses: c-py/action-dotenv-to-setenv@v3
with:
env-file: .env
- name: Get version
run: |
echo "RELEASE_TAG=v${GO_VERSION}" >> $GITHUB_ENV
- name: Notify goreleaser-cross with new release
uses: benc-uk/workflow-dispatch@v1
with:
workflow: goreleaser
inputs: '{ "tag" : "${{ env.RELEASE_TAG }}" }'
notify-goreleaser-pro-bump:
runs-on: ubuntu-latest
needs:
- goreleaser-bump
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup env
uses: c-py/action-dotenv-to-setenv@v3
with:
env-file: .env
- name: Get version
run: |
echo "RELEASE_TAG=v${GO_VERSION}" >> $GITHUB_ENV
- name: Notify goreleaser-cross-pro with new release
uses: benc-uk/workflow-dispatch@v1
with:
workflow: goreleaser-pro
inputs: '{ "tag" : "${{ env.RELEASE_TAG }}" }'