diff --git a/.github/workflows/releaseExtension.yml b/.github/workflows/releaseExtension.yml new file mode 100644 index 0000000..7b52a01 --- /dev/null +++ b/.github/workflows/releaseExtension.yml @@ -0,0 +1,35 @@ +name: Release Extension + +on: + release: + types: [ published ] + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + cache: gradle + - name: Build Zip + run: ./gradlew hivemqExtensionZip + - name: Get release + id: get_release + uses: bruceadams/get-release@v1.3.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: ./build/hivemq-extension/hivemq-deny-wildcard-extension-${{ github.event.release.name }}.zip + asset_name: hivemq-deny-wildcard-extension-${{ github.event.release.name }}.zip + asset_content_type: application/zip