-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 1.49 KB
/
build-and-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build and Deploy
on:
push:
branches: [ main, drafting ]
pull_request:
branches: [ drafting ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Build
uses: xu-cheng/latex-action@v3
with:
root_file: cv.tex
working_directory: cv
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: cv
path: cv/cv.pdf
compression-level: 0 # don't compress PDF
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: cv
path: artifacts
- run: ls -R artifacts
- name: Tag
id: generate_release_tag
uses: amitsingh-007/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: 'v'
tag_template: 'yyyy.mm.dd.i'
- name: Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}
artifacts: "artifacts/cv.pdf"
generateReleaseNotes: true