Merge pull request #68 from api3dao/renovate/other-minor-updates #1
Workflow file for this run
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: | |
| - production | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| pull-requests: write | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "yarn" | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Ensure main is present for commit message prep | |
| run: | | |
| git checkout main | |
| git checkout production | |
| - name: Prepare commit message | |
| run: | | |
| echo "NEW_VERSION=$(yarn changeset status --output=release.json > /dev/null && jq -r '.releases[0].newVersion' release.json && rm release.json)" >> "$GITHUB_ENV" | |
| - name: Check release | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: yarn run release | |
| commit: "ci: release nodary-utilities v${{ env.NEW_VERSION }}" | |
| title: "ci: release nodary-utilities v${{ env.NEW_VERSION }}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| - name: Create pull request | |
| if: steps.changesets.outputs.published == 'true' | |
| run: gh pr create -B main -H production --title 'Merge production into main' --body 'Merges production into main' --reviewer hiletmis | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |