Skip to content
Snippets Groups Projects
Commit 5c8bb181 authored by Philipp Stadler's avatar Philipp Stadler
Browse files

chore: omit zip from build

Try to reduce artifact size by excluding zip archive from releases.
parent 366688bc
No related branches found
No related tags found
1 merge request!126chore: omit zip from build and add new content
Pipeline #12620 passed
......@@ -26,15 +26,14 @@ build:
script:
- NPM_VERSION=$(grep '"version":' package.json -m 1 | cut -d '"' -f 4)
- RELEASE_DIR=sinologie-anki-pack-$NPM_VERSION
- ZIP="$RELEASE_DIR.zip"
- ZIP_DOWNLOAD_URL="https://gitlab.phaidra.org/kartenaale/sinologie-anki-pack/-/jobs/$CI_JOB_ID/artifacts/raw/$ZIP"
- DIR_DOWNLOAD_URL="https://gitlab.phaidra.org/kartenaale/sinologie-anki-pack/-/jobs/$CI_JOB_ID/artifacts/raw/$RELEASE_DIR"
# just to be safe. because the rule does not track folder renamings
- rm -f apkgs.d.mk
- BUILD_PREFIX="" make check ANNOUNCEMENT $ZIP
- BUILD_PREFIX="" make check ANNOUNCEMENT $RELEASE_DIR
- echo BUILD_JOB_ID=$CI_JOB_ID > build.env
- echo NPM_VERSION=$NPM_VERSION >> build.env
- echo RELEASE_DIR=$RELEASE_DIR >> build.env
- echo ZIP_DOWNLOAD_URL=$ZIP_DOWNLOAD_URL >> build.env
- echo DIR_DOWNLOAD_URL=$DIR_DOWNLOAD_URL >> build.env
artifacts:
paths:
- sinologie-anki-pack-*
......@@ -102,8 +101,8 @@ create-gitlab-release:
description: CHANGELOG-$NPM_VERSION.md
assets:
links:
- name: "sinologie-anki-pack-$NPM_VERSION.zip"
url: '$ZIP_DOWNLOAD_URL'
- name: "sinologie-anki-pack-$NPM_VERSION"
url: '$DIR_DOWNLOAD_URL'
whatsapp-ping:
stage: notify
......
......@@ -8,7 +8,10 @@ MOSTLY_CLEAN += $(RELEASE_ZIP)
MOSTLY_CLEAN_DIRS += $(RELEASE_DIR)
.PHONY: release
release: $(RELEASE_ZIP)
release: $(RELEASE_DIR)
.PHONY: release-zip
release-zip: $(RELEASE_ZIP)
$(RELEASE_DIR): \
$(DOCS_HTML) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment