Skip to content

chore(deps): update actions/checkout action to v4 #468

chore(deps): update actions/checkout action to v4

chore(deps): update actions/checkout action to v4 #468

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ^6
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Lint
run: pnpm run lint
build:
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ^6
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Build
run: pnpm run build
- uses: JS-DevTools/npm-publish@v2
id: publish
if: ${{ github.ref == 'refs/heads/main' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./package.json
tag: latest
access: public
dry-run: false
check-version: true
greater-version-only: true
- name: Tag
if: github.ref_name == 'main' && steps.publish.outputs.type != 'none'
uses: anothrNick/github-tag-action@v1
env:
CUSTOM_TAG: ${{ steps.publish.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
if: github.ref_name == 'main' && steps.publish.outputs.type != 'none'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.publish.outputs.version }}
body:
'Changelog: https://github.com/iendeavor/zod-schema-faker/blob/${{ steps.publish.outputs.version
}}/CHANGELOG.md'
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ^6
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'pnpm'
- name: Install
run: pnpm install
- name: Test
run: pnpm run test -- --no-cache --collect-coverage
- name: Coverage
uses: codecov/codecov-action@v3
with:
directory: ./coverage/
fail_ci_if_error: true