Skip to content

Create Beta Build

Create Beta Build #54

Workflow file for this run

name: Create Beta Build
on:
workflow_dispatch:
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies (packages)
run: |
curl -LO https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_macosx_x86_64
sudo install -m755 ldid_macosx_x86_64 /usr/local/bin/ldid
brew install 7zip gnu-sed
- name: Select Xcode 15.1
run: |
sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer
mkdir upload
- name: Upload file to Catbox
id: upload_catbox
run: |
UPLOAD_OUTPUT=$(pyupload .gitignore --host=catbox)
echo "Upload Output: $UPLOAD_OUTPUT"
LINK=$(echo "$UPLOAD_OUTPUT" | grep -oP '(https://files\.catbox\.moe/\S+)')
echo "Uploaded file link: $LINK"
echo "::set-output name=catbox_link::$LINK"
- name: Send Discord build message
run: |
COMMIT_HASH=$(git log -1 --pretty=format:'%h') &&
COMMIT_MESSAGE=$(git log -1 --pretty=format:'%s') &&
(
curl "${{ secrets.B_WEBHOOK }}" -sS -H "Content-Type:application/json" -X POST -d '{
"content":null,
"embeds":[
{
"title":"${{ github.repository }} [Build ${{ github.run_number }}]",
"description":"[`'"$COMMIT_HASH"'`](https://github.com/${{ github.repository }}/commit/'"$COMMIT_HASH"') '"$COMMIT_MESSAGE"'",
"url":"https://github.com/${{ github.repository }}/actions/runs/${GITHUB_RUN_ID}",
"color":6648790,
"author":{
"name":"${{ github.actor }}",
"icon_url":"https://github.com/${{ github.actor }}.png"
}
}
],
"attachments":[],
"components":[
{
"type":1,
"components":[
{
"type":2,
"url":"${{ steps.upload_catbox.outputs.catbox_link }}",
"label":"Download",
"style":5
}
]
}
]
}'
)