diff --git a/.github/workflows/texgen.yml b/.github/workflows/texgen.yml index 069454c..8221bc4 100644 --- a/.github/workflows/texgen.yml +++ b/.github/workflows/texgen.yml @@ -1,37 +1,38 @@ name: texgen on: push: - branches: [ "main" ] - workflow_dispatch: - + tags: + - '*.*.*' jobs: - build: + build_latex: runs-on: ubuntu-latest steps: - - name: Set Up Repo - uses: actions/checkout@v3 - - name: Tex Build + - name: Set up Git repository + uses: actions/checkout@v2 + - name: Compile LaTeX document uses: xu-cheng/latex-action@v2 with: - root_file: "src.tex" - - name: Release - id: release + root_file: src.tex + + - name: Create Release + id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} with: tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} ${{ github.event.head_commit.message }} + release_name: Release ${{ github.ref }} draft: false prerelease: false - - name: Upload - id: upload + + - name: Upload Release Asset + id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./file1.pdf - asset_name: file1.pdf + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./main.pdf + asset_name: main.pdf asset_content_type: pdf