feat: update MiKTeX package database and remove latest release before new release
This commit is contained in:
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@@ -25,6 +25,9 @@ jobs:
|
||||
apt-get install miktex -y
|
||||
miktexsetup --shared=yes finish
|
||||
|
||||
- name: Update MiKTeX package database
|
||||
run: miktex packages update-package-database && miktex packages update
|
||||
|
||||
- name: Enable automatic package installation
|
||||
run: initexmf --set-config-value=[MPM]AutoInstall=yes
|
||||
|
||||
@@ -35,6 +38,12 @@ jobs:
|
||||
- name: Check for PDF artifact
|
||||
run: file ${{ env.PDF_NAME }} || grep -q ' PDF '
|
||||
|
||||
- name: Delete release and tag by tag name`:` latest
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
curl -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" -X DELETE https://gitea.kobim.cloud/api/v1/repos/${{ github.repository }}/releases/tags/latest
|
||||
curl -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" -X DELETE https://gitea.kobim.cloud/api/v1/repos/${{ github.repository }}/tags/latest
|
||||
|
||||
- name: Release PDF artifact
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
uses: softprops/action-gh-release@v2
|
||||
@@ -43,3 +52,4 @@ jobs:
|
||||
tag_name: latest
|
||||
body: |
|
||||
PDF document built from latest LaTeX source.
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
Reference in New Issue
Block a user