From 34b89d8c6493a59c8b06814272c6b8e0454dc54c Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Wed, 23 Feb 2022 13:40:07 +0100 Subject: [PATCH] Create marketplace-upload.yml --- .github/workflows/marketplace-upload.yml | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/marketplace-upload.yml diff --git a/.github/workflows/marketplace-upload.yml b/.github/workflows/marketplace-upload.yml new file mode 100644 index 0000000..7422d74 --- /dev/null +++ b/.github/workflows/marketplace-upload.yml @@ -0,0 +1,32 @@ +on: + push: + tags: + - 'v*' + +name: Upload to HumHub Marketplace + +jobs: + build: + name: Build and Upload Module Package + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + path: ${{ github.event.repository.name }} + + - name: Build project + run: | + zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}/ +# - name: Install Composer +# run: cd ${{ github.event.repository.name }}; composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + +# - name: Install NPM +# run: cd ${{ github.event.repository.name }}; npm install + + - name: Upload Package to HumHub Marketplace + run: | + curl --fail \ + -F "key=${{secrets.MARKETPLACE_API_KEY}}" \ + -F "ModuleVersionUpload[zipFile]=@${{ github.event.repository.name }}.zip" \ + https://api.humhub.com/v1/marketplace/upload?moduleId=${{ github.event.repository.name }}