mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-09-19 23:29:53 +00:00
ci: add gen-single-include
This commit is contained in:
parent
5e8d8d0243
commit
137f17f2e9
31
.github/workflows/single-include.yml
vendored
Normal file
31
.github/workflows/single-include.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: gen-singlue-include
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: Ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: |
|
||||
g++-12 -std=c++20 -O2 tools/expand/main.cpp -o expand
|
||||
./expand include/toml.hpp > single_include.hpp
|
||||
- name: Check diff
|
||||
id: check-diff
|
||||
continue-on-error: true
|
||||
run: |
|
||||
diff single_include.hpp single_include/toml.hpp
|
||||
- name: Commit and Push
|
||||
if: steps.check-diff.outcome == "failure"
|
||||
run: |
|
||||
mv single_include.hpp single_include/toml.hpp
|
||||
git config user.name "ToruNiina"
|
||||
git config user.name "ToruNiina@users.noreply.github.com"
|
||||
git add single_include/toml.hpp
|
||||
git commit -b "feat [skip ci]: update single_include"
|
||||
git push
|
Loading…
Reference in New Issue
Block a user