Merge pull request #18 from thomas-saigre/17-required-packages-optional #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Automated testing | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| artifact: | |
| name: Test and create artifact | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v5 | |
| - name: Compile documentation document | |
| uses: xu-cheng/latex-action@v4 | |
| with: | |
| root_file: | | |
| tests/test-fa0.tex | |
| tests/test-fa1.tex | |
| tests/test-fa5.tex | |
| tests/test-packages.tex | |
| tikz-shields-doc.tex | |
| latexmk_shell_escape: true | |
| post_compile: "latexmk -c; rm -rf _minted*" | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tikz-shields | |
| path: | | |
| ./tikz-shields.sty | |
| ./tikz-shields-doc.tex | |
| ./tikz-shields-doc.pdf | |
| ./README.md | |
| ./LICENSE | |
| ./doc/** | |
| !./.git* | |
| !./.gitignore | |
| release: | |
| needs: [artifact] | |
| runs-on: ubuntu-latest | |
| name: Create Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{ github.workspace }}/artifact | |
| - name: Create archive | |
| run: | | |
| temp_dir=$(mktemp -d) | |
| cd artifact | |
| zip -r "${temp_dir}/tikz-shields.zip" ./ | |
| cd .. | |
| mv "${temp_dir}/tikz-shields.zip" ./ | |
| rm -rf "${temp_dir}" | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref }} | |
| name: Release ${{ github.ref }} | |
| draft: true | |
| prerelease: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| files: tikz-shields.zip |