Add step to release candidate workflow (#232) #174
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| # Only on changes to ./changeset/* | |
| - .changeset/** | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| # https://github.com/actions/checkout/issues/1471#issuecomment-1771231294 | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| token: ${{ secrets.GH_BOT_PAT }} | |
| # Corepack is an official tool by Node.js that manages package managers versions | |
| - name: Setup yarn | |
| run: corepack enable | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: ".node-version" | |
| cache: "yarn" | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Configure Git user | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "dx-pagopa-bot" | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9 | |
| with: | |
| version: yarn run version | |
| publish: yarn run release | |
| setupGitUser: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_BOT_PAT }} |