forked from AsherGlick/Burrito
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.51 KB
/
release_minor.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
47
48
49
name: Release Minor
on:
schedule:
- cron: "0 13 * * 2"
jobs:
Pre-Build:
uses: ./.github/workflows/build.yml
Check:
runs-on: ubuntu-latest
needs: Pre-Build
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github
- name: Get the repository state
uses: ./.github/actions/repo-state
id: repo-state
- name: Check if there are new commits to release
if: steps.repo-state.outputs.commits <= 0
run: |
echo "::error ::There is nothing to release. We need at least one unreleased commit."
exit 1
- name: Check if the binaries from the pre-build-job differ from the last release
if: steps.repo-state.outputs.note == needs.Pre-Build.outputs.checksum
run: |
echo "::error ::There is nothing to release. The produced binaries are exactly the same as in the latest release."
exit 1
- name: Add a new release-tag
env:
VERSION_MAJOR: ${{ steps.repo-state.outputs.version_major }}
VERSION_MINOR: ${{ steps.repo-state.outputs.version_minor }}
run: |
git tag release-$(( $VERSION_MAJOR )).$(( $VERSION_MINOR +1 )).0
git push origin release-$(( $VERSION_MAJOR )).$(( $VERSION_MINOR +1 )).0
Build:
uses: ./.github/workflows/build.yml
needs: Check
Publish:
uses: ./.github/workflows/publish.yml
needs: Build
with:
artifact-name: Burrito_Linux.zip
checksum: ${{ needs.Build.outputs.checksum }}