File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create Release
2+
3+ on :
4+ workflow_run :
5+ workflows : ["Linpad application"]
6+ types :
7+ - completed
8+
9+ jobs :
10+ create_release :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+
16+ - name : Get current version
17+ id : get_version
18+ run : |
19+ # Fetch the latest tag
20+ TAG=$(git describe --tags --abbrev=0)
21+ # Extract the version numbers
22+ VERSION=${TAG//v/}
23+ # Split into an array
24+ IFS='.' read -r -a VERSION_ARRAY <<< "$VERSION"
25+ # Increment the last digit for beta versions
26+ LAST=${VERSION_ARRAY[2]}
27+ NEW_LAST=$((LAST + 1))
28+ NEW_VERSION="v${VERSION_ARRAY[0]}.${VERSION_ARRAY[1]}.$NEW_LAST-beta"
29+ echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
30+
31+ - name : Create Release
32+ uses : softprops/action-gh-release@v1
33+ with :
34+ tag_name : ${{ env.NEW_VERSION }}
35+ release_name : ${{ env.NEW_VERSION }}
36+ body : " Release of Linpad application version ${{ env.NEW_VERSION }}"
37+ files : output/linpad.deb
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments