Update translations #195
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
name: Build pages for TWiLight Menu++ | |
on: | |
push: | |
branches: ["*"] | |
paths-ignore: [README.md, crowdin.yml] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build pages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install ffmpeg jq p7zip-full -y | |
- name: Run Application | |
run: | | |
bun install | |
bun bun.ts web | |
- name: Pack 7z Package for nightly | |
run: | | |
cd nitrofiles | |
7z a ../pages.7z pages | |
- name: Upload to pages release | |
run: | | |
ID=35207926 | |
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}" | |
# Update description | |
UPLOAD_URL="https://api.github.com/repos/${{ github.repository }}/releases/$ID" | |
curl -XPATCH -H "$AUTH_HEADER" "$UPLOAD_URL" -d "{\"body\": \"This release always has the latest page files\n\nLast updated: $(git rev-parse --short HEAD)\"}" | |
# Delete old file | |
ASSET_ID=$(curl https://api.github.com/repos/${{ github.repository }}/releases/$ID/assets | jq --raw-output '.[0].id') | |
UPLOAD_URL="https://api.github.com/repos/${{ github.repository }}/releases/assets/$ASSET_ID" | |
curl -XDELETE -H "$AUTH_HEADER" "$UPLOAD_URL" | |
# Upload new file | |
CONTENT_LENGTH="Content-Length: $(stat -c%s pages.7z)" | |
CONTENT_TYPE="Content-Type: application/7z-x-compressed" | |
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=pages.7z" | |
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file pages.7z "$UPLOAD_URL" |