Skip to content

Commit

Permalink
feat: create draft release in deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalk0 committed Jun 21, 2024
1 parent 59abdd1 commit f1e03cf
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit f1e03cf

Please sign in to comment.