diff --git a/content/blog/04-automatic-release.md b/content/blog/04-automatic-release.md index 061fbc6..3a2cc9a 100644 --- a/content/blog/04-automatic-release.md +++ b/content/blog/04-automatic-release.md @@ -160,11 +160,17 @@ jobs: cd public zip -r ../build.zip ./* + # Need to delete old package first, otherwise new will not replace it + - name: Delete old package (if exists) + run: | + curl -X DELETE --user "${{ github.actor }}:${{ secrets.PACKAGE_TOKEN }}" \ + "https://git.jirkabuilds.dev/api/packages/${{ github.repository_owner }}/generic/hugo-build/latest/web.zip" || true + - name: Uploading package back to gitea run: | - curl --user "${{ github.actor }}:${{ secrets.PACKAGE_TOKEN }}" \ + curl -f --user "${{ github.actor }}:${{ secrets.PACKAGE_TOKEN }}" \ --upload-file build.zip \ - "https://git.jirkabuilds.dev/api/packages/${{ github.repository_owner }}/generic/hugo-build/latest/build.zip" + "https://git.jirkabuilds.dev/api/packages/${{ github.repository_owner }}/generic/hugo-build/latest/web.zip" # TODO - Webhook ```