-
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (76 loc) · 3.16 KB
/
api5.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: XRNX Package and Release (Older Version)
on:
workflow_dispatch:
push:
branches:
- main
jobs:
package-and-release-older-version:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v2
# Set up Git (required for tagging)
- name: Set up Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
# Modify main.lua: Comment out PakettieSpeak and PakettiBeatDetect require lines
- name: Modify main.lua
run: |
sed -i '/require\s*["'\'']PakettieSpeak["'\'']/s/^/-- /' main.lua
sed -i '/require\s*["'\'']PakettiBeatDetect["'\'']/s/^/-- /' main.lua
# Comment out specific function in Paketti0G01_Loader.lua
- name: Comment out function in Paketti0G01_Loader.lua
run: |
sed -i '/function update_loadPaleGreenTheme_preferences()/,/end/s/^/-- /' Paketti0G01_Loader.lua
# Remove style attributes (with or without spaces around =) from all .lua files
- name: Remove style attributes from .lua files
run: |
find . -type f -name "*.lua" -exec sed -i 's/style\s*=\s*"[^"]*"//g' {} +
# Modify manifest.xml: Change ApiVersion from 6 to 5
- name: Modify manifest.xml
run: |
sed -i 's/<ApiVersion>6<\/ApiVersion>/<ApiVersion>5<\/ApiVersion>/g' manifest.xml
# Zip the modified contents, excluding Git and GitHub directories
- name: Zip XRNX Package (Older Version)
run: zip -r org.lackluster.Paketti_V3.54.xrnx . \
-x "*.git*" "*.github*" \
"preferences.xml" \
"preferences_deviceLoaders.xml" \
"preferences_midigen.xml" \
"preferences_pluginLoaders.xml" \
"preferencesDynamicView.xml"
# Dynamically generate a tag name for the older version and set it as an environment variable
- name: Generate Tag Name for Older Version
run: |
echo "TAG_NAME=older-v-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
# Create a tag with the generated tag name
- name: Create and Push Tag
run: |
git tag $TAG_NAME
git push origin $TAG_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create a GitHub release using the generated tag name
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: Older Version Release ${{ env.TAG_NAME }}
draft: false
prerelease: false
# Upload the older version XRNX file to the GitHub release
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./org.lackluster.Paketti_V3.54.xrnx
asset_name: org.lackluster.Paketti_V3.54.older.xrnx
asset_content_type: application/octet-stream