publish-plugin-theme-builder #45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Publish Theme Builder Plugin Release' | |
| on: | |
| repository_dispatch: | |
| types: [publish-plugin-theme-builder] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Тэг для релиза" | |
| required: true | |
| concurrency: | |
| # New commit on branch cancels running workflows of the same branch | |
| group: ${{ github.workflow }}-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| publish-plugin: | |
| name: Publish theme builder plugin release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Prepare environment | |
| uses: ./.github/actions/prepare-android-env | |
| - name: Determine tag | |
| id: inputs | |
| run: | | |
| if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then | |
| TAG="${{ github.event.client_payload.tag }}" | |
| else | |
| TAG="${{ github.event.inputs.tag }}" | |
| fi | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| - name: Publish plugin | |
| env: | |
| GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} | |
| GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} | |
| run: | | |
| ./gradlew \ | |
| -Dgradle.publish.key=$GRADLE_PUBLISH_KEY \ | |
| -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET \ | |
| :sdds-core:plugin_theme_builder:publishPlugins --info -PbranchName=main | |
| - name: Upload plugin artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: theme-builder | |
| path: sdds-core/plugin_theme_builder/build/libs/*.jar | |
| - name: Update Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ steps.inputs.outputs.tag }} | |
| draft: true | |
| allowUpdates: true | |
| omitBody: true | |
| generateReleaseNotes: true | |
| artifacts: sdds-core/plugin_theme_builder/build/libs/*.jar |