Skip to content

Kogama Version Check #56859

Kogama Version Check

Kogama Version Check #56859

Workflow file for this run

name: Kogama Version Check
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up environment
run: |
mkdir "$PWD/downloads"
echo "DOWNLOAD_DIR=$PWD/downloads" >> $GITHUB_ENV
- name: Check kogama [www] Updates
run: bash .github/workflows/scripts/update.sh
env:
API_URL: https://api-www.kgoma.com/v1/api/server/unity/standalone-url/
KOGAMA: WWW
- name: Upload [www] release assets
if: env.KOGAMA_FILE_WWW != ''
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: versions
tag_name: versions
files: ${{ env.KOGAMA_FILE_WWW }}
- name: Check kogama [br] Updates
run: bash .github/workflows/scripts/update.sh
env:
API_URL: https://api-br.kgoma.com/v1/api/server/unity/standalone-url/
KOGAMA: BR
- name: Upload [br] release assets
if: env.KOGAMA_FILE_BR != ''
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: versions
tag_name: versions
files: ${{ env.KOGAMA_FILE_BR }}
- name: Check kogama [friends] Updates
run: bash .github/workflows/scripts/update.sh
env:
API_URL: https://api-friends.kgoma.com/v1/api/server/unity/standalone-url/
KOGAMA: FRIENDS
- name: Upload [friends] release assets
if: env.KOGAMA_FILE_FRIENDS != ''
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: versions
tag_name: versions
files: ${{ env.KOGAMA_FILE_FRIENDS }}
- name: Order markdown version table
if: env.KOGAMA_UUIDS != ''
run: |
{
head -n 2 "$PWD/version.md"
tail -n +3 "$PWD/version.md" | sort -r -t '|' -k2,2 -k4,4
} > temp_version.md && mv temp_version.md "$PWD/version.md"
- name: Commit and push if there are changes
if: env.KOGAMA_UUIDS != ''
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add version.md
git commit -m "Add new version" || echo "No changes to commit"
git push