remove nrwl from eslintrc #42
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: Release | |
on: | |
push: | |
branches: | |
- master | |
- 'alpha/*' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18] | |
npm-version: [9] | |
yarn-version: ['3.4.x'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v2 | |
with: | |
main-branch-name: ${{ github.base_ref }} | |
- name: Detect package manager | |
id: package_manager | |
run: | | |
echo "::set-output name=name::$([[ -f ./yarn.lock ]] && echo "yarn" || ([[ -f ./pnpm-lock.yaml ]] && echo "pnpm") || echo "npm")" | |
- name: Set node/npm/yarn versions using volta | |
uses: volta-cli/action@v4 | |
with: | |
node-version: '${{ matrix.node-version }}' | |
npm-version: '${{ matrix.npm-version }}' | |
yarn-version: '${{ matrix.yarn-version }}' | |
- name: Print node/npm/yarn versions | |
id: versions | |
run: | | |
node_ver=$( node --version ) | |
yarn_ver=$( yarn --version || true ) | |
echo "Node: ${node_ver:1}" | |
echo "NPM: $(npm --version )" | |
if [[ $yarn_ver != '' ]]; then echo "Yarn: $yarn_ver"; fi | |
echo "::set-output name=node_version::${node_ver:1}" | |
- name: Use the node_modules cache if available [npm] | |
if: steps.package_manager.outputs.name == 'npm' | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}- | |
- name: Get yarn cache directory path | |
if: steps.package_manager.outputs.name == 'yarn' | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Use the node_modules cache if available [yarn] | |
if: steps.package_manager.outputs.name == 'yarn' | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}- | |
- name: Install dependencies | |
run: | | |
if [ "${{ steps.package_manager.outputs.name == 'yarn' }}" == "true" ]; then | |
echo "Running yarn install --frozen-lockfile" | |
yarn install --frozen-lockfile | |
elif [ "${{ steps.package_manager.outputs.name == 'pnpm' }}" == "true" ]; then | |
echo "Running pnpm install --frozen-lockfile" | |
pnpm install --frozen-lockfile | |
else | |
echo "Running npm ci" | |
npm ci | |
fi | |
- run: | | |
npx nx run nx-serverless:lint | |
npx nx run nx-serverless:test --ci --code-coverage | |
npx nx run nx-serverless:build | |
- name: Release | |
if: ${{ success() && (github.event_name != 'pull_request' || github.event.action == 'closed' && github.event.pull_request.merged == true) }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npx nx run nx-serverless:release | |
- name: Finish Release | |
run: npx semantic-release-plus |