tkr/.gitea/workflows/build_and_publish.yaml
Greg Sarjeant 33d722b225 Add zip archive to build. (#82)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/82
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-28 22:21:34 +00:00

39 lines
1.6 KiB
YAML

name: Build and publish artifacts
run-name: ${{ gitea.repository }} build and publish
on:
push:
tags:
- v*.**.**
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build tgz archive
run: |
tar \
--transform 's,^,tkr/,' \
--exclude='storage/db' \
--exclude='storage/logs' \
--exclude='storage/upload' \
-czvf tkr.${{ gitea.ref_name }}.tgz \
README.md LICENSE tkr-setup.php config examples public src storage templates
- name: Push tgz to Generic gitea registry
run: |
curl \
--user ${{ secrets.CONTAINER_REGISTRY_USERNAME}}:${{ secrets.CONTAINER_REGISTRY_TOKEN }} \
--upload-file tkr.${{ gitea.ref_name}}.tgz \
https://gitea.subcultureofone.org/api/packages/${{ secrets.CONTAINER_REGISTRY_USERNAME }}/generic/tkr/${{ gitea.ref_name }}/tkr.${{ gitea.ref_name }}.tgz
- name: Build zip archive
run: |
(cd ../; \
zip -r tkr/tkr.zip \
tkr/README.md tkr/LICENSE tkr/tkr-setup.php tkr/config tkr/examples tkr/public tkr/src tkr/storage tkr/templates)
- name: Push zip to Generic gitea registry
run: |
curl \
--user ${{ secrets.CONTAINER_REGISTRY_USERNAME}}:${{ secrets.CONTAINER_REGISTRY_TOKEN }} \
--upload-file tkr.${{ gitea.ref_name}}.zip \
https://gitea.subcultureofone.org/api/packages/${{ secrets.CONTAINER_REGISTRY_USERNAME }}/generic/tkr/${{ gitea.ref_name }}/tkr.${{ gitea.ref_name }}.zip