fix(gh_api_client): remote client should never being shared everywhere bacause the underlying connection pool will be reused. #1646
This file contains 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: On release | |
on: | |
pull_request: | |
types: closed | |
branches: [main] # target branch of release PRs | |
jobs: | |
info: | |
if: github.event.pull_request.merged | |
outputs: | |
is-release: ${{ steps.meta.outputs.is-release }} | |
crate: ${{ steps.meta.outputs.crates-names }} | |
version: ${{ steps.meta.outputs.version-actual }} | |
notes: ${{ steps.meta.outputs.notes }} | |
runs-on: ubuntu-latest | |
steps: | |
- id: meta | |
uses: cargo-bins/release-meta@v1 | |
with: | |
event-data: ${{ toJSON(github.event) }} | |
extract-notes-under: '### Release notes' | |
release-lib: | |
if: needs.info.outputs.is-release == 'true' && needs.info.outputs.crate != 'cargo-binstall' | |
needs: info | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --no-self-update --profile minimal | |
- name: Push lib release tag | |
if: needs.info.outputs.crate != 'cargo-binstall' | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: ${{ needs.info.outputs.version }} | |
tag_prefix: ${{ needs.info.outputs.crate }}-v | |
- name: Publish to crates.io | |
run: | | |
cargo publish -p '${{ needs.info.outputs.crate }}' | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
release-cli: | |
if: needs.info.outputs.crate == 'cargo-binstall' | |
needs: info | |
uses: ./.github/workflows/release-cli.yml | |
secrets: inherit | |
with: | |
info: ${{ toJSON(needs.info.outputs) }} | |