Skip to content

Commit

Permalink
ci push triggerd only on code
Browse files Browse the repository at this point in the history
  • Loading branch information
sheverniskiy committed May 28, 2022
1 parent 87fd956 commit b12c9ca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Install, build and test
- name: Install, build
run: |
yarn
yarn run build
- name: Increase version
run: yarn version
run: yarn version --patch

- name: Commit package.json with new version
uses: EndBug/add-and-commit@v9
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,34 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2

- name: Check changed files
id: files
uses: jitterbit/get-changed-files@v1
- run: |
echo "iscode=false" >> $GITHUB_ENV
for changed_file in ${{ steps.files.outputs.all }}; do
echo "File ${changed_file}."
done
- name: Use Node ${{ matrix.node }}
if: ${{ env.iscode == 'true' }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install deps and build (with cache)
if: ${{ env.iscode == 'true' }}
run: yarn

- name: Lint
if: ${{ env.iscode == 'true' }}
run: yarn lint

- name: Test
if: ${{ env.iscode == 'true' }}
run: yarn test --ci --maxWorkers=2

- name: Build
if: ${{ env.iscode == 'true' }}
run: yarn build

0 comments on commit b12c9ca

Please sign in to comment.