Update #16
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: CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Compile | |
run: | | |
BUILD=$(($(git rev-list --count --first-parent HEAD)+3500)) | |
VERSION=$(($(git rev-list --count --first-parent HEAD))) | |
TODAY=$(date +"%d.%m.%y") | |
echo "BUILD=${BUILD}" >> "$GITHUB_ENV" | |
echo "TODAY=${TODAY}" >> "$GITHUB_ENV" | |
echo "Build number ${BUILD}" | |
mkdir -p out | |
php manager.php genhash out/locale_tr_game.hash "files/" | |
cd extra | |
cp -r * "../files/" | |
cd ../files | |
zip -qry ../out/umineko-tr-files_r${BUILD}.zip * || exit 1 | |
cd .. | |
echo "Kurulum detayları için [buraya](https://github.com/Witch-Love/umineko-scripting-tr/tree/master/INSTALLATION.md) bakın." >> release_notes.md | |
- name: Release | |
if: github.repository_owner == 'Witch-Love' | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: z${{ env.BUILD }} | |
release_name: Umineko Witch Love Files r${{ env.BUILD }} | |
body_path: release_notes.md | |
draft: false | |
prerelease: false | |
- name: Upload TR Files | |
if: github.repository_owner == 'Witch-Love' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./out/umineko-tr-files_r${{ env.BUILD }}.zip | |
asset_name: umineko-tr-files.zip | |
asset_content_type: application/zip | |
- name: Upload TR Hash File | |
if: github.repository_owner == 'Witch-Love' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./out/locale_tr_game.hash | |
asset_name: locale_tr_game.hash | |
asset_content_type: text/plain | |
- name: Trigger new scripts build | |
if: github.repository_owner == 'Witch-Love' | |
run: | | |
curl -H "Accept: application/vnd.github.everest-preview+json" \ | |
-H "Authorization: token ${{ secrets.ACTIONS_KEY }}" \ | |
--request POST \ | |
--data '{"event_type": "Trigger new scripts build"}' \ | |
https://api.github.com/repos/Witch-Love/umineko-scripting-tr/dispatches |