-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (43 loc) · 1.59 KB
/
main.yml
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: Publish
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 Deezer -r API *.pm HTML Settings lib install.xml strings.txt README.md
- 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 repo/release.pl repo/repo.xml ${{ steps.set-version.outputs.version }} Deezer.zip $url
- name: Update Repository
run: |
git config user.name github-actions
git config user.email [email protected]
git add repo/repo.xml
git commit -m "Update repo.xml for release ${{ steps.set-version.outputs.version }}"
git push origin HEAD:main
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.set-version.outputs.version }}
name: Version ${{ steps.set-version.outputs.version }}
body: Deezer plugin release
draft: false
prerelease: false
files: Deezer.zip