Skip to content

Commit

Permalink
Remove pushing to TWLBot
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed May 24, 2024
1 parent df8d610 commit ac9a376
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac9a376

Please sign in to comment.