-
-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (33 loc) · 948 Bytes
/
release.yml
File metadata and controls
37 lines (33 loc) · 948 Bytes
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
name: Auto Release
on:
push:
branches:
- master
paths:
- 'index.php'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Extract Version
id: get_version
run: |
VERSION=$(grep -oE 'Arcane [0-9]+\.[0-9]+\.[0-9]+' index.php | awk '{print $2}')
if [ -z "$VERSION" ]; then
echo "Error: Version could not be extracted from index.php."
exit 1
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ steps.get_version.outputs.tag }} \
--title "${{ steps.get_version.outputs.version }}" \
--generate-notes \
index.php