-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (70 loc) · 2.46 KB
/
push-to-master.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build and Publish CV
on:
push:
branches:
- master
jobs:
build-and-publish-cv-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
working_directory: fancy-cv
root_file: |
cv-en-industry-succinct.tex
cv-es-industry-succinct.tex
latexmk_use_xelatex: true
- name: Get previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Get next minor version'
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: Get current date
id: date
run: |
DAY=$(date +%-d)
case "$DAY" in
1|21|31) DAY="$DAY"st;;
2|22) DAY="$DAY"nd;;
3|23) DAY="$DAY"rd;;
*) DAY="$DAY"th;;
esac
echo "date=$(date +'%B') $DAY, $(date +%Y)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.semvers.outputs.patch }}
release_name: Software Industry CV versions. ${{ env.date }}
draft: false
prerelease: false
- name: Attach 'cv-en-industry-succinct.pdf' to the Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./fancy-cv/cv-en-industry-succinct.pdf
asset_name: cv-en-industry-succinct.pdf
asset_content_type: application/pdf
- name: Attach 'cv-es-industry-succinct.pdf' to the Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./fancy-cv/cv-es-industry-succinct.pdf
asset_name: cv-es-industry-succinct.pdf
asset_content_type: application/pdf