diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3080684..0424b43 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,14 +16,10 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - uses: bahmutov/npm-install@v1 - - name: If this step fails run 'npm run lint' and 'npm run format' then commit again. + - name: If this step fails run 'yarn lint' and 'yarn format' then commit again. run: | - PACKAGE_MANAGER=npm - if [ -f "./yarn.lock" ]; then - PACKAGE_MANAGER=yarn - fi - $PACKAGE_MANAGER run lint:check - $PACKAGE_MANAGER run format:check + yarn lint:check + yarn format:check test: runs-on: ${{ matrix.os }} needs: test_lint @@ -33,24 +29,14 @@ jobs: os: [ windows-latest, ubuntu-latest ] name: Test with Node v${{ matrix.node }} on ${{ matrix.os }} steps: - - name: Tell if project is using npm or yarn - id: step1 - uses: garronej/ts-ci@v2.0.2 - with: - action_name: tell_if_project_uses_npm_or_yarn - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - uses: bahmutov/npm-install@v1 - - if: steps.step1.outputs.npm_or_yarn == 'yarn' - run: | - yarn build - yarn test - - if: steps.step1.outputs.npm_or_yarn == 'npm' - run: | - npm run build - npm test + - run: yarn build + - run: yarn test + check_if_version_upgraded: name: Check if version upgrade # We run this only if it's a push on the default branch or if it's a PR from a @@ -110,12 +96,7 @@ jobs: with: registry-url: https://registry.npmjs.org/ - uses: bahmutov/npm-install@v1 - - run: | - PACKAGE_MANAGER=npm - if [ -f "./yarn.lock" ]; then - PACKAGE_MANAGER=yarn - fi - $PACKAGE_MANAGER run build + - run: yarn build - run: npx -y -p denoify@1.2.2 enable_short_npm_import_path env: DRY_RUN: "0" diff --git a/README.md b/README.md index fd43443..5c5b68e 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Besides, good stuff that comes with using this template: ## Can I use `npm` instead of `yarn` -Yes, just remove the `yarn.lock` file. +Yes, just remove the `yarn.lock` file and edit `.github/workflows/ci.yaml`, replace all `yarn ***` by `npm run ****`. ## What will be included in the npm bundle? All filles listed in [the files property of your package JSON](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L35-L41).