forked from oxidecomputer/oxide.go
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.09 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
on:
push:
tags:
- v*
name: make-release
jobs:
makerelease:
name: make release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.x"
- name: Run make generate
run: |
make generate
shell: bash
# Ensure no files changed.
- name: Ensure no files changed
shell: bash
run: |
if [[ `git status --porcelain` ]]; then
echo "Files changed, exiting";
exit 1;
else
# No changes
echo "No files changed, proceeding";
fi
- name: Get if prerelease
shell: bash
id: extract_prerelease
run: |
if cat VERSION | 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@v1
with:
prerelease: ${{steps.extract_prerelease.outputs.prerelease}}