Skip to content

Commit

Permalink
ci fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Oct 23, 2024
1 parent b1ba5a4 commit 93fe3a9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/pdf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Manual CI
name: Generate PDF

on:
workflow_dispatch:
Expand All @@ -9,7 +9,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4

- name: Setup Zig
uses: mlugg/setup-zig@v1
Expand All @@ -29,10 +29,22 @@ jobs:
id: set_release_name
run: echo "RELEASE_NAME=$(TZ=Asia/Shanghai date +'%Y%m%d%H%M')" >> $GITHUB_ENV

- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Create Tag
run: git tag ${{ steps.set_release_name.outputs.RELEASE_NAME }}

- name: Push Tag
run: git push origin ${{ steps.set_release_name.outputs.RELEASE_NAME }}

- name: Create and Upload Release
uses: softprops/action-gh-release@v2
with:
files: PDF/zig_course.pdf
name: ${{ env.RELEASE_NAME }}
tag_name: ${{ steps.set_release_name.outputs.RELEASE_NAME }}
name: ${{ steps.set_release_name.outputs.RELEASE_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 93fe3a9

Please sign in to comment.