Skip to content

Commit

Permalink
Update files to align with new patch-template
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed May 5, 2024
1 parent 263a1d0 commit a9a2d35
Show file tree
Hide file tree
Showing 18 changed files with 558 additions and 825 deletions.
52 changes: 52 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Checkout line endings based on OS (do not force crlf where not necessary)
* text=auto

# Checkout Windows-style line endings and ensure correct encoding
# Encoding is not localization but fixed zSTRING::Upper code page handling!
# See https://forum.worldofplayers.de/forum/threads/1537187/page3
# and https://forum.worldofplayers.de/forum/threads/759496
*.[dD] text working-tree-encoding=CP1252 eol=crlf
*.[cC][sS][lL] text working-tree-encoding=CP1252 linguist-detectable=false

# Exclude (semi-) binary resources from linguist stats

# Output units
*.[bB][iI][nN] binary linguist-detectable=false

# Animation files
*.[aA][sS][cC] text linguist-detectable=false
*.[mM][dD][sS] text linguist-detectable=false
*.[mM][aA][nN] binary linguist-detectable=false
*.[mM][dD][hH] binary linguist-detectable=false
*.[mM][dD][lL] binary linguist-detectable=false
*.[mM][dD][mM] binary linguist-detectable=false
*.[mM][mM][bB] binary linguist-detectable=false
*.[mM][sS][bB] binary linguist-detectable=false
*.[sS][sS][cC] binary linguist-detectable=false

# Graphic files
*.[tT][gG][aA] binary linguist-detectable=false
*.[tT][eE][xX] binary linguist-detectable=false
*.[fF][nN][tT] binary linguist-detectable=false

# Mesh files (ZEN might be ASCII or binary)
*.3[dD][sS] binary linguist-detectable=false
*.[mM][rR][mM] binary linguist-detectable=false
*.[mM][sS][hH] binary linguist-detectable=false
*.[zZ][eE][nN] text=auto linguist-detectable=false

# Music files
*.[dD][lL][sS] binary linguist-detectable=false
*.[sS][tT][yY] binary linguist-detectable=false
*.[sS][gG][tT] binary linguist-detectable=false

# Sound files
*.[wW][aA][vV] binary linguist-detectable=false
*.[oO][gG][gG] binary linguist-detectable=false
*.[mM][pP]3 binary linguist-detectable=false

# Video files
*.[bB][iI][kK] binary linguist-detectable=false

# VDF in case committed (mixed binary and text)
*.[vV][dD][fF] binary linguist-detectable=false
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: szapp
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file is keeps the GitHub Actions up-to-date
# For more information, visit https://docs.github.com/en/code-security/dependabot
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
8 changes: 8 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file excludes bot authors from the automatically generated release notes
# For more information, visit https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes

changelog:
exclude:
authors:
- dependabot
- github-actions
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: build

on:
push:
tags:
- "[Vv]?[0-9]+.[0-9]+*"
release:
types: [published]
workflow_dispatch:

permissions:
contents: write

jobs:
vdfsbuilder:
name: Create VDF
runs-on: ubuntu-latest
steps:
- name: Get patch name from repository name
run: |
echo "PATCH_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Get short SHA
if: (!startsWith(github.ref, 'refs/tags/'))
run: echo "VERSION=${GITHUB_SHA::7}" >> $GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@v4

- name: Build VDF
uses: kirides/vdfsbuilder@aaf901f0c98245af54102a1946d8be0e2e17ba36
with:
in: ${{ env.PATCH_NAME }}.vm

- name: Create release with assests (if tag pushed)
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'release'
run: gh release create ${{ env.VERSION }} --generate-notes "${{ env.PATCH_NAME }}.vdf" || exit 0
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Upload release assests (if release published)
if: github.event_name == 'release'
run: gh release upload ${{ env.VERSION }} "${{ env.PATCH_NAME }}.vdf" || exit 0
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Upload artifacts
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: ${{ env.PATCH_NAME }}-${{ env.VERSION }}
path: "${{ env.PATCH_NAME }}.vdf"
overwrite: true
27 changes: 27 additions & 0 deletions .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: scripts

# Trigger workflow on push events with changes in SRC or D files
on:
push:
paths:
- "Ninja/**/*.src"
- "Ninja/**/*.d"

# These permissions are necessary for creating the check runs
permissions:
checks: write
contents: read

# The checkout action needs to be run first
jobs:
parsiphae:
name: Run Parsiphae
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check scripts
uses: szapp/parsiphae-action@v1
with:
# Adjust these if changing the directory in the repository
# For more information on the configuration, visit https://github.com/szapp/parsiphae-action/#configuration
file: Ninja/*/*.src
29 changes: 29 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: validation

# Trigger workflow on push events with changes in SRC or D files
on:
push:
paths:
- "Ninja/**/*.src"
- "Ninja/**/*.d"
- "_work/Data/**/*"

# These permissions are necessary for creating the check runs
permissions:
checks: write
contents: read

# The checkout action needs to be run first
jobs:
patch-validator:
name: Run patch validator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for validity
uses: szapp/patch-validator@v1
with:
# Adjust these if changing the patch name or its root directory in the repository
# For more information on the configuration, visit https://github.com/szapp/patch-validator/#configuration
patchName:
rootPath:
6 changes: 6 additions & 0 deletions .validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is required for the patch-validator to work and may contain advanced configuration options
# For more information, visit https://github.com/szapp/patch-validator/#configuration

prefix:
ignore-declaration:
ignore-resource:
36 changes: 33 additions & 3 deletions Autosave.vm
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,48 @@ BaseDir=.\
VDFName=.\Autosave.vdf

[FILES]
; Resources (list the specific files from _work here)
; _work\* -r
; Modular resources
_work\Data\Anims\_compiled\*.MAN
_work\Data\Anims\_compiled\*.MDH
_work\Data\Anims\_compiled\*.MDL
_work\Data\Anims\_compiled\*.MDM
_work\Data\Anims\_compiled\*.MMB
_work\Data\Anims\_compiled\*.MSB
_work\Data\Meshes\_compiled\*.MRM
_work\Data\Meshes\_compiled\*.MSH
_work\Data\Presets\*.ZEN
_work\Data\Sound\SFX\*.WAV
_work\Data\Sound\Speech\*.WAV
_work\Data\Textures\_compiled\*-C.TEX
_work\Data\Textures\_compiled\*.FNT
_work\Data\Worlds\*.ZEN

; Script files
; Ninja resources
Ninja\Autosave\* -r

; License and README
LICENSE
README.md

[EXCLUDE]
; Exclude sub-directories
*\Ninja\* -r
*\_work\* -r

; Exclude source scripts
_work\Data\Scripts\* -r

; Exclude metadata
.empty -r
*.vm
*.vdf
*.bat
*.cfg
.*

[INCLUDE]
; License and README
LICENSE
README.md

[ENDVDF]
Loading

0 comments on commit a9a2d35

Please sign in to comment.