Merge pull request #238 from uswds/mh/add-flag-prop #12
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 and publish to NPM | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup project | |
| uses: ./.github/actions/setup | |
| with: | |
| skipInstall: 'true' # we need to skip the install step because we need to update npm first for OIDC | |
| - name: Update npm version | |
| run: npm install -g npm@latest # OIDC requires npm v11.5.1 or later | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # pin@v1.5.3 | |
| with: | |
| publish: npm run release | |
| commitMode: github-api # the api is required to get signed commits on changeset bot's workflow | |
| branch: develop | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HUSKY: 0 | |
| NPM_TOKEN: '' # setting this to an empty string makes changesets use trusted publishing: https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 |