File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Build PDF on Release
1+ name : Auto Release
22
33on :
44 push :
@@ -10,12 +10,10 @@ permissions:
1010 contents : write
1111
1212jobs :
13- build-pdf :
14- name : Generate PDF
13+ release :
1514 runs-on : ubuntu-latest
1615 steps :
17- - name : Checkout code
18- uses : actions/checkout@v6
16+ - uses : actions/checkout@v6
1917
2018 - name : Install Chromium and CJK fonts
2119 run : |
2725 LATEST_TAG=$(curl -fsSL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/yeasy/mdpress/releases/latest | jq -r .tag_name)
2826 VERSION="${LATEST_TAG#v}"
2927 echo "Installing mdpress $VERSION"
30- curl -fsSL "https://github.com/yeasy/mdPress/releases/download/$LATEST_TAG/mdpress_${VERSION}_linux_amd64.tar.gz" -o mdpress.tar.gz
31- tar xzf mdpress.tar.gz
32- sudo mv mdpress /usr/local/bin/
28+ curl -fsSL "https://github.com/yeasy/mdPress/releases/download/$LATEST_TAG/mdpress_${VERSION}_linux_amd64.tar.gz" -o /tmp/ mdpress.tar.gz
29+ tar xzf /tmp/ mdpress.tar.gz -C /tmp mdpress
30+ sudo mv /tmp/ mdpress /usr/local/bin/
3331 mdpress --version
3432
3533 - name : Extract tag name
3937 - name : Build PDF
4038 run : mdpress build --format pdf --output docker_practice-${{ steps.tag.outputs.TAG_NAME || 'latest' }}.pdf
4139
42- - name : Create Release and upload PDF
40+ - name : Create Release with PDF
4341 if : startsWith(github.ref, 'refs/tags/')
4442 uses : softprops/action-gh-release@v2
4543 with :
Original file line number Diff line number Diff line change 22
33on :
44 push :
5+ branches :
6+ - master
57 pull_request :
68 workflow_dispatch :
79
You can’t perform that action at this time.
0 commit comments