diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 4d0299a..4b88561 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -2,10 +2,20 @@ name: Build Plugin JAR File on: push: - branches: [ main ] + branches: + - main + paths: + - "**" + - "!**.md" release: types: - created + pull_request: + branches: + - main + paths: + - "**" + - "!**.md" jobs: build: @@ -79,3 +89,26 @@ jobs: name: artifactName, data: await fs.readFile(artifactPathName) }); + + app-store-release: + runs-on: ubuntu-latest + needs: build + if: github.event_name == 'release' + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Download plugin-highlightjs jar + uses: actions/download-artifact@v2 + with: + name: plugin-highlightjs + path: build/libs + - name: Sync to Halo App Store + uses: halo-sigs/app-store-release-action@main + with: + github-token: ${{secrets.GITHUB_TOKEN}} + app-id: ${{secrets.APP_ID}} + release-id: ${{ github.event.release.id }} + assets-dir: "build/libs" + halo-username: ${{ secrets.HALO_USERNAME }} + halo-password: ${{ secrets.HALO_PASSWORD }}