mirror of
https://codeberg.org/spire/autoexec.git
synced 2026-08-02 12:14:52 +02:00
ci
This commit is contained in:
parent
15b63eef7c
commit
4b55a85f9d
4 changed files with 44 additions and 29 deletions
42
.forgejo/workflows/compile.yaml
Normal file
42
.forgejo/workflows/compile.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
name: Build sourcepawn and commit
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.sp'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: nix
|
||||
env:
|
||||
PLUGIN: "autoexec"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: check_file_outdated
|
||||
name: Check if ${{ env.PLUGIN }}.smx is outdated
|
||||
run: |
|
||||
if [ ./plugin/${{ env.PLUGIN }}.sp -nt ./plugin/${{ env.PLUGIN }}.smx ]; then
|
||||
echo "${{ env.PLUGIN }}.smx is up to date"
|
||||
echo "outdated=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "${{ env.PLUGIN }}.smx is outdated"
|
||||
echo "outdated=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||
if: steps.check_file_outdated.outputs.outdated == 'true'
|
||||
with:
|
||||
name: link
|
||||
instance: https://cache.icewind.link
|
||||
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||
|
||||
- name: Build
|
||||
if: steps.check_file_outdated.outputs.outdated == 'true'
|
||||
run: nix build && cp -L result ./plugin/${{ env.PLUGIN }}.smx
|
||||
|
||||
- name: Commit files
|
||||
if: steps.check_file_outdated.outputs.outdated == 'true'
|
||||
run: |
|
||||
git config --global user.email ""
|
||||
git config --global user.name "Compile from CI"
|
||||
git commit -m "Compile sourcepawn" -a
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue