-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
49 lines (46 loc) · 1.72 KB
/
action.yml
File metadata and controls
49 lines (46 loc) · 1.72 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
42
43
44
45
46
47
48
49
---
name: "Make Stable AppImage Release"
description: "Reads version and appname files, creates a release and updates LATEST_VERSION"
runs:
using: "composite"
steps:
- name: Read version and get date
shell: sh
run: |
if [ ! -f ./appinfo ]; then
>&2 echo "ERROR: No ./appinfo file found!"
exit 1
fi
APPNAME=$(awk -F'=' '/X-AppImage-Name/{print $2; exit}' ./appinfo)
VERSION=$(awk -F'=' '/X-AppImage-Version/{print $2; exit}' ./appinfo)
if [ -z "$APPNAME" ]; then
>&2 echo "ERROR: ./appinfo is missing X-AppImage-Name"
exit 1
elif [ -z "$VERSION" ]; then
>&2 echo "ERROR: ./appinfo is missing X-AppImage-Version"
exit 1
fi
echo "APPNAME=$APPNAME" >> "${GITHUB_ENV}"
echo "VERSION=$VERSION" >> "${GITHUB_ENV}"
echo "DATE=$(date +'%Y-%m-%d_%s')" >> "${GITHUB_ENV}"
- name: Release Artifacts
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
with:
name: "${{ env.APPNAME }}: ${{ env.VERSION }}"
tag_name: "${{ env.VERSION }}@${{ env.DATE }}"
prerelease: false
draft: false
generate_release_notes: false
make_latest: true
files: |
*.AppImage*
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Update LATEST_VERSION
shell: sh
run: |
echo "${{ env.VERSION }}" > ./LATEST_VERSION
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add ./LATEST_VERSION
git commit --allow-empty -m 'bump `LATEST_VERSION` [skip ci]'
git push