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