chore(ci): Add config to Using third-party package publishing tools #195
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
| # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
| name: Release ReactSimpleIcons | |
| on: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: [created] | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write | |
| jobs: | |
| publish-npm: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install manager packages 馃摝 | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: package.json | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Install dependencies | |
| shell: bash | |
| run: pnpm install --no-frozen-lockfile | |
| - name: 馃敟 generate:icons | |
| run: pnpm generate:icons | |
| - name: 馃挘 build | |
| run: pnpm build | |
| - name: Create Release Pull Request or Publish to GitHub Packages 馃摝 | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm release | |
| commit: 'ci(Release): version icons-pack/react-simple-icons' | |
| title: 'ci(Release): version icons-pack/react-simple-icons' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |