Merge pull request #780 from xeroxinteractive/renovate/actions-checko… #97
This file contains 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
on: | |
push: | |
branches: | |
- release | |
- next | |
name: Publish | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Prepare repository | |
run: git fetch --unshallow --tags | |
- uses: nrwl/nx-set-shas@v3 | |
with: | |
main-branch-name: 'next' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- uses: bahmutov/npm-install@v1 | |
- run: yarn global add nx | |
- run: nx affected:lint | |
- run: nx affected:test | |
- run: nx affected:build | |
- name: Publish to GitHub Packages | |
if: github.ref == 'refs/heads/release' || github.ref == 'refs/heads/next' | |
run: | | |
echo '{ "version": "independent", "npmClient": "yarn", "packages": [ "packages/dist/*" ] }' > lerna.json | |
npx auto shipit | |
env: | |
SLACK_WEBHOOK_URL: ${{secrets.NPM_SLACK_WEBHOOK}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |