Skip to content

Commit

Permalink
Merge pull request #2 from victorsoares96/gh-actions
Browse files Browse the repository at this point in the history
CI/CD gh actions
  • Loading branch information
victorsoares96 authored Jun 19, 2022
2 parents 4eb8a3c + c539087 commit 38bf278
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: build
name: Continuous Deployment

on: [pull_request, push]
on:
release:
types: [created]

jobs:
build:
publish:
runs-on: ubuntu-latest

strategy:
Expand All @@ -18,9 +20,9 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Format check
run: yarn format:check
- name: Unit Testing
run: yarn test
env:
CI: true
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- if: steps.publish.outputs.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
52 changes: 52 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Continuous Integration

on: [pull_request]

jobs:
validate:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Linting
run: yarn lint:fix
- name: Type Check
run: yarn type-check
- name: Unit Testing
run: yarn test:coverage
- name: Build
run: yarn build
env:
CI: true
publish:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn --frozen-lockfile
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: true
- if: steps.publish.outputs.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-react-intl-universal",
"version": "1.0.0",
"version": "1.0.1",
"description": "ESLint plugin for React Intl Universal",
"main": "lib/index.js",
"private": false,
Expand Down Expand Up @@ -33,8 +33,16 @@
"internationalization",
"react-intl-universal"
],
"author": "Victor Soares",
"license": "MIT",
"repository": "https://github.com/victorsoares96/eslint-plugin-react-intl-universal",
"author": "Victor Soares <vitorsoares96@hotmail.com> (https://github.com/victorsoares96)",
"license": "MIT",
"bugs": {
"url": "https://github.com/victorsoares96/eslint-plugin-react-intl-universal/issues"
},
"homepage": "https://github.com/victorsoares96/eslint-plugin-react-intl-universal#readme",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@types/eslint": "8.4.2",
"@types/estree": "0.0.51",
Expand Down Expand Up @@ -63,7 +71,7 @@
"lint-staged": {
"*.@(ts|tsx)": [
"npm run lint",
"npm run fix",
"npm run lint:fix",
"npm run type-check"
]
},
Expand Down

0 comments on commit 38bf278

Please sign in to comment.