Publish New Version #36
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 New Version | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bump: | |
| type: choice | |
| description: "Type of version bump to perform" | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| generate_release_notes: | |
| name: Generate Release Notes | |
| runs-on: ubuntu-24.04 | |
| environment: 'publish' | |
| outputs: | |
| release_notes: ${{ steps.update_release_notes.outputs.release_notes }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| persist-credentials: false | |
| # Bump the version using our custom action | |
| - uses: GetStream/android-ci-actions/actions/bump-version@v0.1 | |
| id: bump-version | |
| with: | |
| bump: ${{ inputs.bump }} | |
| file-path: ./buildSrc/src/main/kotlin/io/getstream/chat/android/Configuration.kt | |
| - name: Parse release section in changelog | |
| run: ./gradlew changelog-release-section | |
| - name: Commit changes | |
| uses: EndBug/add-and-commit@v9.1.4 | |
| with: | |
| add: '["CHANGELOG.md"]' | |
| message: "AUTOMATION: CHANGELOG Update" | |
| default_author: github_actions | |
| push: false | |
| - name: Push changes | |
| uses: ad-m/github-push-action@v0.8.0 | |
| with: | |
| github_token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} | |
| branch: release | |
| force: true | |
| - name: Update release notes | |
| id: update_release_notes | |
| run: | | |
| ./gradlew generate-release | |
| { | |
| echo "release_notes<<EOF" | |
| cat build/tmp/CHANGELOG_PARSED.md | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| publish: | |
| needs: generate_release_notes | |
| uses: GetStream/android-ci-actions/.github/workflows/release-new-version.yml@main | |
| with: | |
| ref: "release" | |
| bump: ${{ inputs.bump }} | |
| file-path: ./buildSrc/src/main/kotlin/io/getstream/chat/android/Configuration.kt | |
| release-notes: ${{ needs.generate_release_notes.outputs.release_notes }} | |
| excluded-modules: "stream-chat-android-ui-components-sample,stream-chat-android-compose-sample,stream-chat-android-docs" | |
| use-official-plugin: false | |
| # Disable explicit documentation tasks as they are already included while publishing | |
| documentation-tasks: tasks | |
| secrets: | |
| OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
| OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
| SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
| SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
| SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
| STREAM_PUBLIC_BOT_TOKEN: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} | |
| update_develop_changelog: | |
| needs: publish | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| ref: develop | |
| persist-credentials: false | |
| - name: Update changelog | |
| run: cat CHANGELOG_MODEL.md CHANGELOG.md > newChangelog.md && mv newChangelog.md CHANGELOG.md | |
| - name: Commit changes | |
| uses: EndBug/add-and-commit@v9.1.4 | |
| with: | |
| add: '["CHANGELOG.md"]' | |
| message: "AUTOMATION: CHANGELOG Update" | |
| default_author: github_actions | |
| push: false | |
| - name: Push changes | |
| uses: ad-m/github-push-action@v0.8.0 | |
| with: | |
| github_token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} | |
| branch: develop | |
| force: true |