.forgejo: add generate-tarball job

This commit is contained in:
Antoine Martin 2024-08-11 23:23:25 -04:00
parent 8bfd7eacbe
commit b6a2163361
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -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 }}.*