Skip to content

Commit

Permalink
automatic injection of Updater.lua on release
Browse files Browse the repository at this point in the history
  • Loading branch information
gesslar committed Jun 25, 2024
1 parent 89e7b1f commit ab66e44
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 150 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,26 @@ jobs:
steps:
- uses: actions/checkout@v3.3.0

- name: Download Updater.lua
run: |
mkdir -p src/scripts
curl -L -o src/scripts/Updater.lua https://github.com/gesslar/mupdate/releases/latest/download/Updater.lua
- name: Check and create scripts.json if it doesn't exist
run: |
if [ ! -f src/scripts/scripts.json ]; then
mkdir -p src/scripts
echo '[]' > src/scripts/scripts.json
fi
- name: Update scripts.json
run: |
jq '. += [{"isActive": "yes", "isFolder": "no", "name": "Updater", "script": ""}]' src/scripts/scripts.json > tmp.json && mv tmp.json src/scripts/scripts.json
- name: JSON to variables
# see https://github.com/antifree/json-to-variables
# You may pin to the exact commit or the version.
# uses: antifree/json-to-variables@cc8c6394031e145c90f7f9ec909d83df92431fb8
uses: antifree/json-to-variables@v1.2.0
with:
# The json file.
filename: "./mfile"
# The prefix for variables.
prefix: "mfile"

- name: "create version file"
Expand All @@ -31,17 +42,11 @@ jobs:
echo "${{ env.mfile_version }}" > "${{ env.mfile_package }}_version.txt"
- name: Build With Muddler
# You may pin to the exact commit or the version.
# uses: demonnic/build-with-muddler@a9355b3c4f93553287e0f2d4087508b9f6164225
uses: demonnic/build-with-muddler@main
with:
# Version of muddler to use
muddlerVersion: LATEST # optional, default is LATEST
# What directory to run muddler in.
#workingDir: # optional, default is ${{ github.workspace }}
muddlerVersion: LATEST

- uses: ncipollo/release-action@v1
# see https://github.com/marketplace/actions/create-release
with:
artifacts: "build/${{ env.mfile_package }}.mpackage,${{ env.filename }}"
allowUpdates: true
Expand Down
2 changes: 1 addition & 1 deletion mfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"package": "ThreshCommandRepeater",
"title": "Repeat the last command sent to the MUD with Ctrl-R (Cmd-R)",
"description": "Threshold Command Repeater Package for Mudlet ",
"version": "1.6.0",
"version": "1.7.0",
"author": "Gesslar@Threshold",
"icon": "griffon-right.jpg",
"dependencies": "",
Expand Down
129 changes: 0 additions & 129 deletions src/scripts/Updater.lua

This file was deleted.

8 changes: 0 additions & 8 deletions src/scripts/scripts.json

This file was deleted.

0 comments on commit ab66e44

Please sign in to comment.