-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (51 loc) · 2.04 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
name: Release
on:
push:
tags:
- "*"
env:
typst_coverletter: Typst-ModernPro-Coverletter
jobs:
build:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Zip
id: zip
run: |
mkdir ${{ env.typst_coverletter }}
cp ./modernpro-coverletter.typ ./example-coverletter.typ ${{ env.typst_coverletter }}
zip -r ${{ env.typst_coverletter }}.zip ./${{ env.typst_coverletter }}
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 coverletter zip
id: upload-coverletter-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_coverletter }}.zip
asset_name: ${{ env.typst_coverletter }}-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Upload coverletter
id: upload-coverletter-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: ./modernpro-coverletter.typ
asset_name: modernpro-coverletter.typ
asset_content_type: text/typst