feat: add TIP-1034 session client support (#494) #355
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: Release | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: {} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_NET_GIT_FETCH_WITH_CLI: "true" | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: {} | |
| env: | |
| RELEASE_BOT_APP_ID: ${{ vars.RELEASE_BOT_APP_ID || secrets.RELEASE_BOT_APP_ID }} | |
| RELEASE_BOT_PRIVATE_KEY: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }} | |
| steps: | |
| - name: Check release bot credentials | |
| id: release-bot | |
| run: | | |
| if [ -z "${RELEASE_BOT_APP_ID}" ] || [ -z "${RELEASE_BOT_PRIVATE_KEY}" ]; then | |
| echo "configured=false" >> "$GITHUB_OUTPUT" | |
| echo "::notice::Release bot credentials are not configured; skipping release PR automation." | |
| else | |
| echo "configured=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Mint scoped app token | |
| if: steps.release-bot.outputs.configured == 'true' | |
| id: app-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| with: | |
| client-id: ${{ env.RELEASE_BOT_APP_ID }} | |
| private-key: ${{ env.RELEASE_BOT_PRIVATE_KEY }} | |
| owner: tempoxyz | |
| repositories: wallet | |
| permission-contents: write | |
| permission-pull-requests: write | |
| permission-metadata: read | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| if: steps.release-bot.outputs.configured == 'true' | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| persist-credentials: false | |
| - uses: tempoxyz/changelogs@57e22cb5bd8367edc8cc1450b9eb0aea75d6e019 # changelogs@0.6.3 + unified PR title + install from source | |
| if: steps.release-bot.outputs.configured == 'true' | |
| id: changelogs | |
| with: | |
| conventional-commit: true | |
| github-token: ${{ steps.app-token.outputs.token }} | |
| - name: Update Cargo.lock on release PR | |
| if: steps.changelogs.outputs.pullRequestNumber != '' | |
| env: | |
| APP_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| git fetch origin changelog-release/main | |
| git checkout changelog-release/main | |
| cargo update --workspace | |
| if ! git diff --quiet Cargo.lock; then | |
| git add Cargo.lock | |
| git commit -m "chore: update Cargo.lock" | |
| git push "https://x-access-token:${APP_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:changelog-release/main | |
| fi |