refactor: encapsulate handle_message params into MessageContext #319
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: Tag on Release PR merge | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: [main] | |
| jobs: | |
| tag: | |
| if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Generate App token | |
| id: app-token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| client-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Create and push tag | |
| run: | | |
| # release/v0.8.0-beta.1 → v0.8.0-beta.1 | |
| # release/gateway-v0.1.0 → gateway-v0.1.0 | |
| VERSION="${GITHUB_HEAD_REF#release/}" | |
| if [[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]] || [[ "$VERSION" =~ ^gateway-v[0-9]+\.[0-9]+\.[0-9]+ ]]; then | |
| git config user.name "openab-app[bot]" | |
| git config user.email "274185012+openab-app[bot]@users.noreply.github.com" | |
| git tag "$VERSION" | |
| git push origin "$VERSION" | |
| echo "::notice::Tagged ${VERSION}" | |
| else | |
| echo "::error::Invalid version format '${VERSION}'" | |
| exit 1 | |
| fi |