This commit is contained in:
Antoine Martin 2024-12-10 14:05:38 -05:00
parent 016ae28326
commit 12e04bc2ac
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -14,9 +14,10 @@ jobs:
image: alpine:3.19
env:
CI_PROJECT_NAME: papermc
ZSTD_LIMIT: 0
steps:
- name: Environment setup
run: apk add nodejs git openjdk21-jre-headless gzip xz tar
run: apk add nodejs git openjdk21-jre-headless zstd tar
- name: Repo pull
uses: actions/checkout@v4
with:
@ -40,9 +41,9 @@ jobs:
echo "Generating tarball.."
tar -cf $CI_PROJECT_NAME-$CI_REF_NAME.tar --exclude-backups --exclude-caches-all --exclude-vcs $CI_PROJECT_NAME-$CI_REF_NAME
echo "Compressing $CI_PROJECT_NAME-$CI_REF_NAME.tar.xz"
xz -T0 -9 -vv -e -c > ./$CI_PROJECT_NAME-$CI_REF_NAME.tar.xz < ./$CI_PROJECT_NAME-$CI_REF_NAME.tar
zstd --auto-threads=logical --ultra --long -22 -T"$ZSTD_LIMIT" -vv $CI_PROJECT_NAME-$CI_REF_NAME.tar -o $CI_PROJECT_NAME-$CI_REF_NAME.tar.zst
echo "Generating sha512sum"
sha512sum $CI_PROJECT_NAME-$CI_REF_NAME.tar.gz > $CI_PROJECT_NAME-$CI_REF_NAME.tar.gz.sha512sum
sha512sum $CI_PROJECT_NAME-$CI_REF_NAME.tar.zst > $CI_PROJECT_NAME-$CI_REF_NAME.tar.zst.sha512sum
- name: Package upload
uses: forgejo/upload-artifact@v3
with:
@ -66,5 +67,5 @@ jobs:
else
CI_REF_NAME=$GITHUB_REF_NAME
fi
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.gz ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.gz
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.gz.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.gz.sha512sum
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.zst ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.zst
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.zst.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.zst.sha512sum