-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (44 loc) · 1.7 KB
/
deploy.yaml
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
name: deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: deploy
path: |
assets/
latex-files/
packages/
ressources-graphiques/
.latexmkrc
Makefile
rapportUTT.tex
rUTT.cls
- name: Create draft release
env:
GH_TOKEN: ${{ github.token }}
run: |
zip -qr deploy.zip \
assets/ \
latex-files/ \
packages/ \
ressources-graphiques/ \
.latexmkrc \
Makefile \
rapportUTT.tex \
rUTT.cls && \
for DRAFT_TAG in $(gh release list --limit 100 --json tagName,isDraft --jq '.[] | select(.isDraft) | .tagName'); do \
gh release delete "$DRAFT_TAG" -y; \
done; YEAR_MONTH=$(date "+%Y.%-m"); COUNT=0; \
for TAG in $(gh release list --exclude-drafts --limit 100 | awk '{print $1}'); do \
case "$TAG" in v"$YEAR_MONTH".*) COUNT=$((COUNT + 1));; esac; \
done; RELEASE_NUMBER=$((COUNT + 1)); \
gh release create --draft --generate-notes "v$YEAR_MONTH.$RELEASE_NUMBER" deploy.zip