Skip to content

Merge pull request #18 from n3rada/dev #10

Merge pull request #18 from n3rada/dev

Merge pull request #18 from n3rada/dev #10

Workflow file for this run

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