-
Notifications
You must be signed in to change notification settings - Fork 4
105 lines (89 loc) · 3.82 KB
/
release.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Release
on:
push:
tags:
- "*"
env:
typst_cv: modernpro-cv
typst_legacy: modernpro-cv-legacy
jobs:
build:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: List template directory contents
run: ls -l ./template/
- name: List legacy directory contents
run: ls -l ./legacy/
- name: Zip
id: zip
run: |
mkdir ${{ env.typst_cv }}
cp ./template/cv-single.typ ./template/cv-double.typ ./modernpro-cv.typ ${{ env.typst_cv }}
zip -r ${{ env.typst_cv }}.zip ./${{ env.typst_cv }}
mkdir ${{ env.typst_legacy }}
cp ./legacy/modernpro-cv-legacy.typ ./legacy/example-single-legacy.typ ./legacy/example-double-legacy.typ ./legacy/coverletter-legacy.typ ${{ env.typst_legacy }}
zip -r ${{ env.typst_legacy }}.zip ./${{ env.typst_legacy }}
echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> "$GITHUB_ENV"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
VERSION: ${{ github.ref }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload CV zip
id: upload-cv-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.typst_cv }}.zip
asset_name: ${{ env.typst_cv }}-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Upload legacy zip
id: upload-cl-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.typst_legacy }}.zip
asset_name: ${{ env.typst_legacy }}-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Upload CV Single
id: upload-cv-single
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./template/cv-single.typ
asset_name: cv-single.typ
asset_content_type: text/typst
- name: Upload CV Double
id: upload-cv-double
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./template/cv-double.typ
asset_name: cv-double.typ
asset_content_type: text/typst
- name: Upload Typst setup
id: upload-typst-setup
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./modernpro-cv.typ
asset_name: modernpro-cv.typ
asset_content_type: text/typst