feat: update eslint-config packages #287
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: Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| actions: write | |
| checks: write | |
| statuses: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-22.04 | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} | |
| - name: Get branch name | |
| id: branch-name | |
| uses: tj-actions/branch-names@v8 | |
| - name: Set git user | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "codecademydev" | |
| git config --global push.default current | |
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > .npmrc | |
| - uses: ./.github/actions/yarn | |
| - run: yarn turbo run build --concurrency=3 | |
| - name: Publish Alpha | |
| # Only publish alpha on non-main branches | |
| if: steps.branch-name.outputs.is_default != 'true' | |
| env: | |
| HUSKY_ENABLED: true | |
| GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| run: | | |
| npx lerna publish --yes --canary --include-merged-tags --dist-tag=alpha.${GITHUB_SHA:0:6} --preid=alpha.${GITHUB_SHA:0:6} | |
| - name: Publish | |
| # Only publish the non-alpha version on main | |
| if: steps.branch-name.outputs.is_default == 'true' | |
| env: | |
| HUSKY_ENABLED: true | |
| GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| run: | | |
| npx lerna publish --yes --exact --conventional-commits --changelog-preset conventionalcommits --include-merged-tags --create-release=github |