|
48 | 48 | permissions: |
49 | 49 | contents: write |
50 | 50 | needs: pre_release_check |
51 | | - uses: GetStream/stream-build-conventions-android/.github/workflows/release.yml@d275481d345e4b3b1252006dbb6cf029c9e32767 |
| 51 | + uses: GetStream/stream-build-conventions-android/.github/workflows/release.yml@d04ef720cd62d48430d0feef3ecd083df3482a9b |
52 | 52 | with: |
53 | 53 | bump: ${{ inputs.bump }} |
54 | 54 | suffix: ${{ inputs.suffix }} |
|
65 | 65 | stream-repo-bucket: ${{ secrets.STREAM_REPO_BUCKET }} |
66 | 66 | stream-repo-access-key-id: ${{ secrets.STREAM_REPO_ACCESS_KEY_ID }} |
67 | 67 | stream-repo-secret-access-key: ${{ secrets.STREAM_REPO_SECRET_ACCESS_KEY }} |
68 | | - |
69 | | - # Customers need one line of setup to see a version that is not on Central, |
70 | | - # so say so at the top of the release, above the generated "What's Changed". |
71 | | - # A separate job because the release is created inside the reusable workflow. |
72 | | - release-notes-header: |
73 | | - needs: publish |
74 | | - if: ${{ inputs.publish-targets == 'streamRepo' }} |
75 | | - name: Add the Stream repository card to the release |
76 | | - runs-on: ubuntu-24.04 |
77 | | - permissions: |
78 | | - contents: write |
79 | | - steps: |
80 | | - - name: Prepend the card |
81 | | - env: |
82 | | - GH_TOKEN: ${{ github.token }} |
83 | | - run: | |
84 | | - set -euo pipefail |
85 | | - # The release this run created: the reusable workflow targets it at the |
86 | | - # release-<branch>-<tag> branch, and it was published after this run started. |
87 | | - # "Newest release" alone could be one made by hand, or one from another branch. |
88 | | - STARTED=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" -q .created_at) |
89 | | - TAG=$(gh api "repos/$GITHUB_REPOSITORY/releases?per_page=30" -q " |
90 | | - [.[] | select((.target_commitish | startswith(\"release-${GITHUB_REF_NAME}-\")) |
91 | | - and .published_at != null and .published_at >= \"$STARTED\")] |
92 | | - | first | .tag_name // empty") |
93 | | - if [ -z "$TAG" ]; then |
94 | | - echo "::error::No release from this run found for ${GITHUB_REF_NAME}" |
95 | | - exit 1 |
96 | | - fi |
97 | | -
|
98 | | - cat > card.md <<EOF |
99 | | - > [!IMPORTANT] |
100 | | - > **\`$TAG\` is published to the Stream Maven repository, not Maven Central.** |
101 | | - > |
102 | | - > \`\`\`kotlin |
103 | | - > // settings.gradle.kts |
104 | | - > dependencyResolutionManagement { |
105 | | - > repositories { |
106 | | - > google() |
107 | | - > mavenCentral() |
108 | | - > maven("https://stream-io-repo.com") |
109 | | - > } |
110 | | - > } |
111 | | - > \`\`\` |
112 | | -
|
113 | | - EOF |
114 | | -
|
115 | | - gh release view "$TAG" -R "$GITHUB_REPOSITORY" --json body -q .body > notes.md |
116 | | - cat card.md notes.md > body.md |
117 | | - gh release edit "$TAG" -R "$GITHUB_REPOSITORY" --notes-file body.md |
0 commit comments