From f1e03cf9c5eb14c74b434ddccf63cc4980dea971 Mon Sep 17 00:00:00 2001 From: Zalko <88582103+zalk0@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:03:15 +0200 Subject: [PATCH 1/2] feat: create draft release in deploy action --- .github/workflows/deploy.yaml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index eacc161..1c78d87 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Upload zip + - name: Upload artifact uses: actions/upload-artifact@v4 with: name: deploy @@ -21,3 +21,23 @@ jobs: 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 From 39f428b8ee2b6f5d96c0d7ee82c9b67b4e19014b Mon Sep 17 00:00:00 2001 From: Zalk0 <88582103+zalk0@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:12:40 +0200 Subject: [PATCH 2/2] fix: change link to latest release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c602346..021e092 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Voici la couverture que vous obtiendrez en utilisant ce projet : ## Utilisation **Pour une utilisation simple, ne téléchargez pas directement tout le repository !** -Téléchargez [l'archive prête à être utilisée](https://nightly.link/n3rada/ScribUTT/workflows/deploy.yaml/main/deploy.zip). +Téléchargez [l'archive prête à être utilisée](https://github.com/n3rada/ScribUTT/releases/latest/download/deploy.zip). ## Bivalence