chore(deps): bump cosmiconfig from 9.0.2 to 10.0.0 (#839) #148
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 Please | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: write | |
| concurrency: | |
| group: release-please-${{ github.repository }} | |
| cancel-in-progress: false | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: googleapis/release-please-action@v5 | |
| id: release | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| include-component-in-tag: false | |
| # A GitHub Release created by this workflow uses the built-in GITHUB_TOKEN, | |
| # and events triggered by GITHUB_TOKEN do not start other workflows. So the | |
| # `release: published` event does NOT trigger npm-publish.yml on its own. | |
| # workflow_dispatch is the documented exception: dispatching it with the | |
| # GITHUB_TOKEN DOES start the run. Trigger the publish here when (and only | |
| # when) release-please actually cut a release. | |
| - name: Trigger the npm publish workflow for the new release | |
| if: ${{ steps.release.outputs.releases_created == 'true' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| # This job does not check out the repo, so pass --repo explicitly | |
| # (gh otherwise looks for a local git remote and fails). release-please | |
| # just cut the release, so it is the most recent one. Retry a few times | |
| # to absorb GitHub API propagation lag right after the release is made. | |
| tag="" | |
| for attempt in 1 2 3 4 5; do | |
| tag="$(gh release list --repo "$REPO" --limit 1 --json tagName --jq '.[0].tagName')" | |
| if [ -n "$tag" ]; then | |
| break | |
| fi | |
| echo "No release visible yet (attempt $attempt/5); retrying in 5s..." | |
| sleep 5 | |
| done | |
| if [ -z "$tag" ]; then | |
| echo "::error::release-please reported a release but no tag could be resolved; not dispatching npm-publish." | |
| exit 1 | |
| fi | |
| echo "Release created; dispatching npm-publish.yml for tag: $tag" | |
| gh workflow run npm-publish.yml --repo "$REPO" --ref master --field tag="$tag" |