From 30077e991ed12bce94425adf9238d10a79a8a31f Mon Sep 17 00:00:00 2001 From: Ron Rise Date: Tue, 17 Jun 2025 20:23:31 -0400 Subject: [PATCH] add publish workflow and update README --- .gitea/workflows/publish.yml | 47 ++++++++++++++++++++++++++++++++++++ README.md | 12 +-------- 2 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..7df710b --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,47 @@ +on: + push: + tags: + - "*.*.*" + +name: Publish Release Package + +jobs: + publish: + env: + NODE_TLS_REJECT_UNAUTHORIZED: 0 + runs-on: ubuntu-latest + steps: + - name: πŸ›‘οΈ πŸ”’ Add Siteworx CA Certificates + run: | + curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt + update-ca-certificates + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Zip files + id: zip_files + run: | + apt update && apt install -y zip + + echo "Creating zip file" + zip -r release.zip . -x ".idea*" "*.git*" "*.github*" "*.gitea*" "node_modules/*" "dist/*" "coverage/*" "build/*" "logs/*" "tmp/*" + echo "Zip file created: release.zip" + + - name: πŸ“¦ Publish Build Artifacts + uses: christopherhx/gitea-upload-artifact@v4 + with: + name: release.zip + path: release.zip + retention-days: 1 + + - name: Upload release package + run: | + output=$(curl --user ${{ secrets.PACKAGE_PUBLISH_USER }}:${{ secrets.PACKAGE_PUBLISH_TOKEN }} \ + --upload-file release.zip \ + ${{ gitea.server_url }}/api/packages/Siteworxpro/composer?version=${{ gitea.ref_name }}) + if [ $? -ne 0 ]; then + echo "Error uploading release package" + exit 1 + fi + echo "Upload successful" \ No newline at end of file diff --git a/README.md b/README.md index b5dbe48..b06bfd9 100644 --- a/README.md +++ b/README.md @@ -129,14 +129,4 @@ When setting the `$createGroup` argument to `false`, permissions `DescribeLogGro } ] } -``` - -## Issues -Feel free to [report any issues](https://github.com/maxbanton/cwh/issues/new) - -## Contributing -Please check [this document](https://github.com/maxbanton/cwh/blob/master/CONTRIBUTING.md) - -___ - -Made in Ukraine πŸ‡ΊπŸ‡¦ +``` \ No newline at end of file