Add github action to compile scripts and make pull request
This commit is contained in:
48
.github/workflows/pr_compile_scripts.yml
vendored
Normal file
48
.github/workflows/pr_compile_scripts.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
name: Generate Compiled Scripts Pull Request
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
windows_build:
|
||||||
|
name: Windows Build
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [3.8]
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Setup python (Windows VM is Python 3.7 by default, we need at least Python 3.8)
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Run Release Script
|
||||||
|
env:
|
||||||
|
EXTRACT_KEY: ${{ secrets.EXTRACT_KEY }}
|
||||||
|
run: |
|
||||||
|
curl -OJ https://raw.githubusercontent.com/07th-mod/higurashi_release/master/compile_higurashi_scripts/compile_higurashi_scripts.py
|
||||||
|
python compile_higurashi_scripts.py ${{ github.event.repository.name }}
|
||||||
|
rm compile_higurashi_scripts.py
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
if: ${{ github.event_name == 'push' }} # Only create pull requests from pushes, not from pull requests
|
||||||
|
with:
|
||||||
|
commit-message: update compiled scripts
|
||||||
|
title: Update Compiled Scripts (github-actions)
|
||||||
|
body: |
|
||||||
|
This is an automatically generated pull request.
|
||||||
|
|
||||||
|
This pull request compiles all the scripts in the `Update` folder into the `CompiledUpdateScripts` folder,
|
||||||
|
so the end-user does not need to compile it on their end.
|
||||||
|
|
||||||
|
You should accept this pull request just before releasing a patch. Please do not accept this pull request at other times,
|
||||||
|
as this will generate unnecessary commits.
|
||||||
|
branch: update-compiled-scripts
|
||||||
Reference in New Issue
Block a user