chore(main): release 0.42.0 (#154) #115
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: Build, test, and publish to Maven Central | ||
|
Check failure on line 1 in .github/workflows/release.yml
|
||
| on: | ||
| release: | ||
| types: [ "published" ] | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag_name: | ||
| description: 'Tag name to release' | ||
| required: true | ||
| type: string | ||
| jobs: | ||
| call-reusable-workflow: | ||
| uses: './.github/workflows/reusable-build-publish.yml' | ||
| with: | ||
| publish: true | ||
| version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name || github.event.release.tag_name }} | ||
| secrets: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
| signing_key: ${{ secrets.GPG_SIGNING_KEY }} | ||
| signing_pub: ${{ secrets.GPG_SIGNING_PUBLIC_KEY }} | ||
| signing_pass: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} | ||
| publish_user: ${{ secrets.CENTRAL_TOKEN_USERNAME }} | ||
| publish_pass: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} | ||
| DATACLOUD_USERNAME: ${{ secrets.DATACLOUD_USERNAME }} | ||
| DATACLOUD_PASSWORD: ${{ secrets.DATACLOUD_PASSWORD }} | ||
| DATACLOUD_CLIENT_ID: ${{ secrets.DATACLOUD_CLIENT_ID }} | ||
| DATACLOUD_CLIENT_SECRET: ${{ secrets.DATACLOUD_CLIENT_SECRET }} | ||
| update-release-status: | ||
| needs: call-reusable-workflow | ||
| runs-on: ubuntu-latest | ||
| if: always() | ||
| steps: | ||
| - name: Update release status | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const tagName = '${{ github.event_name == "workflow_dispatch" && github.event.inputs.tag_name || github.event.release.tag_name }}'; | ||
| const { data: releases } = await github.rest.repos.listReleases({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo | ||
| }); | ||
| const release = releases.find(r => r.tag_name === tagName); | ||
| if (release) { | ||
| const status = '${{ needs.call-reusable-workflow.result }}' === 'success' ? 'published' : 'failed'; | ||
| const body = release.body + `\n\n## Maven Central Status\n- Status: ${status === 'published' ? '✅ Published' : '❌ Failed'}\n- Timestamp: ${new Date().toISOString()}`; | ||
| await github.rest.repos.updateRelease({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| release_id: release.id, | ||
| body: body | ||
| }); | ||
| } | ||