-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.19 KB
/
make-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
38
39
40
41
42
43
44
45
46
on:
push:
tags:
- v*
name: make-release
permissions:
contents: write
jobs:
makerelease:
name: make release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.x'
- name: Run make generate
run: |
make generate
shell: bash
# Ensure no files changed.
- name: Ensure no files changed
shell: bash
run: |
git checkout examples_test.go
if [[ `git status --porcelain` ]]; then
echo "Files changed, exiting";
git status
exit 1;
else
# No changes
echo "No files changed, proceeding";
fi
- name: Get if prerelease
shell: bash
id: extract_prerelease
run: |
if cat VERSION.txt | grep -q "rc"; then
echo "##[set-output name=prerelease;]$(echo true)"
else
echo "##[set-output name=prerelease;]$(echo false)"
fi
- name: Create a Release
uses: softprops/action-gh-release@v2
with:
prerelease: ${{steps.extract_prerelease.outputs.prerelease}}