diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index cb857832c6f9caccc459b16d0c7d99cbd42107e9..119f09fbfdebc14b4199ea2cff300312127e1bf6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,10 +1,6 @@
 name: Build LaTeX document
 on: 
   push:
-    branches:
-      - master
-    tags:
-      - "!v*"
   pull_request:
 
 jobs:
@@ -29,3 +25,20 @@ jobs:
         with:
           name: PDF_${{ matrix.latex }}
           path: njuthesis.pdf
+
+  release:
+    needs: build_latex
+    runs-on: ubuntu-latest
+    if: startsWith(github.ref, 'refs/tags/v')
+    steps:
+      - name: Download artifact
+        uses: actions/download-artifact@v2
+        with:
+          name: PDF_xelatex
+
+      - uses: "marvinpinto/action-automatic-releases@latest"
+        with:
+          repo_token: "${{ secrets.GITHUB_TOKEN }}"
+          prerelease: false
+          files: |
+            njuthesis.pdf
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 48b0f2ef2d0bfb04f30d86065d54ab8c8cfb7dc4..0000000000000000000000000000000000000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "tagged-release"
-
-on:
-  push:
-    tags:
-      - "v*"
-
-jobs:
-  tagged-release:
-    name: "Tagged Release"
-    runs-on: "ubuntu-latest"
-    strategy:
-      matrix:
-        latex: [xelatex]
-    steps:
-      - name: Set up Git repository
-        uses: actions/checkout@v2
-
-      - name: Compile to PDF
-        uses: HermitSun/latex-action@v3
-        with:
-          root_file: njuthesis.tex
-          latexmk_use_${{ matrix.latex }}: true
-          args: '-bibtex'
-
-      - uses: "marvinpinto/action-automatic-releases@latest"
-        with:
-          repo_token: "${{ secrets.GITHUB_TOKEN }}"
-          prerelease: false
-          files: |
-            njuthesis.pdf