diff --git a/.github/workflows/generate_images.yml b/.github/workflows/generate_images.yml new file mode 100644 index 0000000..48f9674 --- /dev/null +++ b/.github/workflows/generate_images.yml @@ -0,0 +1,11 @@ +name: Generate Images +on: push +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Install ImageMagick + run: choco install imagemagick + - name: Generate Images + run: .\generate_content.bat diff --git a/generate_content.bat b/generate_content.bat index 5eb1812..1b2f2fc 100644 --- a/generate_content.bat +++ b/generate_content.bat @@ -1 +1,4 @@ -FOR /R .\source %%I IN (*.txt) DO IF NOT EXIST output\%%~nI.png magick -size 210x210 -font SimHei label:@source\\%%~nxI -bordercolor White -border 15 output\\%%~nI.png \ No newline at end of file +FOR /R .\source %%I IN (*.txt) DO IF NOT EXIST output\%%~nI.png magick -size 210x210 -font SimHei label:@source\\%%~nxI -bordercolor White -border 15 output\\%%~nI.png + +REM Upload generated PNG files as artifacts +FOR %%I IN (output\*.png) DO echo Uploading %%I as artifact && your_artifact_upload_command "%%I" \ No newline at end of file