-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathspring-find-release-version.yml
More file actions
41 lines (35 loc) · 1.26 KB
/
spring-find-release-version.yml
File metadata and controls
41 lines (35 loc) · 1.26 KB
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
name: Find Current Version to Release
on:
workflow_call:
outputs:
releaseVersion:
description: Current Milestone to release
value: ${{ jobs.find-release-version.outputs.releaseVersion }}
hotfix:
description: 'True if Milestone is hotfix'
value: ${{ jobs.find-release-version.outputs.hotfix }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
find-release-version:
runs-on: ubuntu-latest
outputs:
releaseVersion: ${{ steps.milestone.outputs.milestone }}
hotfix: ${{ steps.milestone.outputs.hotfix }}
steps:
- uses: actions/checkout@v6
with:
show-progress: false
- name: Compute next scheduled milestone
id: milestone
uses: spring-io/spring-github-workflows/.github/actions/spring-compute-milestone-to-release@main
- name: Version to Release
run: |
RELEASE_VERSION=${{ steps.milestone.outputs.release-version }}
if [ -z $RELEASE_VERSION ]
then
gh run cancel ${{ github.run_id }}
echo "::warning title=Nothing to release::No scheduled milestone for ${{ steps.compute-version.outputs.version }} version"
else
echo "::notice title=RELEASE VERSION::$RELEASE_VERSION"
fi