-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df8d610
commit ac9a376
Showing
2 changed files
with
0 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,42 +156,6 @@ jobs: | |
with: | ||
name: build | ||
path: build | ||
- name: Commit and push to TWLBot/Builds | ||
id: commit | ||
run: | | ||
CURRENT_DATE=$(date +"%Y%m%d-%H%M%S") | ||
echo "current_date=$CURRENT_DATE" >> $GITHUB_OUTPUT | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "TWLBot" | ||
git clone --depth 1 https://${{ secrets.TWLBOT_TOKEN }}@github.com/TWLBot/Builds.git | ||
cd Builds/ | ||
cp ${{ github.workspace }}/build/*.7z . | ||
mv ${{ github.workspace }}/build/apfix.pck extras | ||
mv ${{ github.workspace }}/build/widescreen.pck extras | ||
git stage . | ||
git commit -m "TWiLightMenu | $COMMIT_HASH" | ||
git tag v$CURRENT_DATE | ||
git push origin v$CURRENT_DATE master | ||
- name: Release to TWLBot/Builds | ||
run: | | ||
AUTH_HEADER="Authorization: token ${{ secrets.TWLBOT_TOKEN }}" | ||
CONTENT_TYPE="Content-Type: application/json" | ||
API_URL="https://api.github.com/repos/TWLBot/Builds/releases" | ||
RELEASE_INFO="{\"tag_name\": \"v${{ steps.commit.outputs.current_date }}\", \"name\": \"TWiLightMenu | $COMMIT_HASH\", \"body\": \"$AUTHOR_NAME - $COMMIT_SUBJECT\", \"prerelease\": true}" | ||
RESPONSE=$(curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_TYPE" "$API_URL" -d "$RELEASE_INFO") | ||
ID=$(echo $RESPONSE | jq --raw-output '.id') | ||
for file in ${{ github.workspace }}/build/*.7z; do | ||
AUTH_HEADER="Authorization: token ${{ secrets.TWLBOT_TOKEN }}" | ||
CONTENT_LENGTH="Content-Length: $(stat -c%s $file)" | ||
CONTENT_TYPE="Content-Type: application/7z-x-compressed" | ||
UPLOAD_URL="https://uploads.github.com/repos/TWLBot/Builds/releases/$ID/assets?name=$(basename $file)" | ||
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL" | ||
done | ||
|
||
send_success_webhook: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,20 +208,6 @@ jobs: | |
with: | ||
name: build | ||
path: build | ||
- name: Commit and push debug files to TWLBot/Builds | ||
id: commit | ||
run: | | ||
CURRENT_DATE=$(date +"%Y%m%d-%H%M%S") | ||
echo "current_date=$CURRENT_DATE" >> $GITHUB_OUTPUT | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "TWLBot" | ||
git clone --depth 1 https://${{ secrets.TWLBOT_TOKEN }}@github.com/TWLBot/Builds.git | ||
cd Builds/ | ||
cp ${{ github.workspace }}/build/TWiLightMenu-debug-release.7z . | ||
git stage . | ||
git commit -m "TWiLightMenu (Release) | $COMMIT_TAG" | ||
git push origin master | ||
- name: Upload to ${{ github.repository }} release | ||
run: | | ||
# Delete debug 7z | ||
|