From b6a2163361b6ceac1d191db7c7005cc07523385f Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 11 Aug 2024 23:23:25 -0400 Subject: [PATCH] .forgejo: add generate-tarball job --- .forgejo/workflows/generate-tarball.yml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .forgejo/workflows/generate-tarball.yml diff --git a/.forgejo/workflows/generate-tarball.yml b/.forgejo/workflows/generate-tarball.yml new file mode 100644 index 0000000000..53a8481385 --- /dev/null +++ b/.forgejo/workflows/generate-tarball.yml @@ -0,0 +1,31 @@ +on: + push: + tags: + - '*' + +jobs: + build-tarball: + runs-on: x86_64 + container: + image: alpinelinux/alpine-gitlab-ci:latest + env: + CI_PROJECT_NAME: zotero + steps: + - name: Environment setup + run: doas apk add nodejs git git-archive-all gzip + - name: Repo pull + uses: actions/checkout@v4 + with: + fetch-depth: 500 + ref: ${{ github.ref_name }} + - name: Package build + run: | + echo "building tarball for ${{ githug.ref_name }}" + git-archive-all --force-submodules $CI_PROJECT_NAME-${{ github.ref_name }}.tar.gz + echo "Generating sha512sum" + sha512sum $CI_PROJECT_NAME-${{ github.ref_name }}.tar.gz > $CI_PROJECT_NAME-${{ github.ref_name }}.tar.gz.sha512sum + - name: Package upload + uses: forgejo/upload-artifact@v3 + with: + name: tarball + path: $CI_PROJECT_NAME-${{ github.ref_name }}.*