Skip to content

Test

Test #99

Workflow file for this run

name: Pack patches

Check failure on line 1 in .github/workflows/pack_patches.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pack_patches.yml

Invalid workflow file

(Line: 24, Col: 1): Unexpected value 'release'
on: [push, pull_request]
jobs:
pack:
name: Pack patches
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Create archives
run: |
7z a -r patches.zip ./patches/*
- name: Upload archives
uses: actions/upload-artifact@v7
with:
name: cheats
path: ./patches.zip
if-no-files-found: error
release:
needs: [pack]
name: Publish release
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: patches
path: ./cheats
- name: Create a new release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=latest
if gh release view $TAG; then
echo "Release exists, uploading asset"
gh release upload $TAG ./cheats/patches.zip --clobber
else
echo "Creating release"
gh release create $TAG ./cheats/patches.zip \
--title "Latest Build" \
--notes "Automated build from main"
fi