fix: add dry-run option to publish target (#248) #440
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
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
pull-requests: write | |
issues: write | |
statuses: write | |
checks: write | |
contents: write | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-monorepo | |
- run: pnpm nx format:check | |
- run: pnpm nx affected -t lint test build | |
- run: | | |
echo "NO_COVERAGE_RUN=$(if [ -z "$(pnpm nx print-affected --select=projects)" ]; then echo "true"; else echo "false";fi)" >> $GITHUB_ENV | |
- name: Merge coverage | |
if: env.NO_COVERAGE_RUN != 'true' | |
run: | | |
node ./tools/scripts/coverageMerger.js | |
- name: Coveralls | |
if: env.NO_COVERAGE_RUN != 'true' | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
if: ${{ success() && (github.event_name != 'pull_request' || github.event.action == 'closed' && github.event.pull_request.merged == true) }} | |
env: | |
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HUSKY: '0' | |
run: | | |
pnpm nx affected --target release --parallel=false |