forked from LMS-Community/plugin-LocalPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.59 KB
/
release.yml
File metadata and controls
53 lines (43 loc) · 1.59 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
50
51
52
name: Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Version
id: set-version
run:
echo "version=`egrep -o "version>(.*)</version" install.xml | egrep -o \"[0-9.]*\"`" >> $GITHUB_OUTPUT
- name: Zip Repository
id: zip
run: zip LocalPlayer -9r Bin *.pm HTML install.xml strings.txt README.md LICENSE
- name: Setup Perl
run: |
sudo apt-get install -y libxml-simple-perl libdigest-sha-perl
- name: Update SHA and Version in repo.xml
id: tag
run: |
url="https://github.com/${{ github.repository }}/releases/download/${{ steps.set-version.outputs.version }}"
perl release.pl repo.xml ${{ steps.set-version.outputs.version }} LocalPlayer.zip $url
- name: Update Repository
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add repo.xml
git commit -m "Update repo.xml for release ${{ steps.set-version.outputs.version }}"
git push origin HEAD:master
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.set-version.outputs.version }}
name: Version ${{ steps.set-version.outputs.version }}
body: Local Player Release
draft: false
prerelease: false
files: LocalPlayer.zip