Commit f302cd67 authored by Sparkf's avatar Sparkf 🏙️
Browse files

update workflow

parent 8eac9cf9
Loading
Loading
Loading
Loading

.github/workflows/release.yml

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
name: Create release

on:
  push:
    tags:
      - 'v*.*.*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          body_path: CHANGELOG.txt
        env:
          GITHUB_TOKEN: ${{ secrets.ORG_TOKEN }}
+42 −0
Original line number Diff line number Diff line
name: Verify and create release

on: [push, pull_request]

jobs:
  build_latex:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Compile LaTeX document
        uses: xu-cheng/texlive-action/full@v1
        with:
          run: |
            apk add make
            make
      - name: Publish PDF as actions assets
        uses: actions/upload-artifact@v2
        with:
          name: PDF
          path: main.pdf
          
  create_release:
    runs-on: ubuntu-latest
    if: "startsWith(github.ref, 'refs/tags/v')"
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Archive Release
        uses: thedoctor0/zip-release@master
        with:
          filename: 'sustech-thesis.zip'
          exclusions: '*.git* /*node_modules/* .editorconfig'
      - name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          body_path: CHANGELOG.txt
          files: sustech-thesis.zip
        env:
          GITHUB_TOKEN: ${{ secrets.ORG_TOKEN }}