diff --git a/.github/workflows/pdf.yml b/.github/workflows/pdf.yml index f135331a..cbe1e3e9 100644 --- a/.github/workflows/pdf.yml +++ b/.github/workflows/pdf.yml @@ -1,4 +1,4 @@ -name: Manual CI +name: Generate PDF on: workflow_dispatch: @@ -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 @@ -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 }} \ No newline at end of file