Skip to content

Commit

Permalink
Configure ci for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-dharti-r committed Jan 10, 2024
1 parent bd5e8dd commit fdb45d4
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 5 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish React Package to npmjs

on:
push:

jobs:
vue-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.x"
- run: |
cd vue
npm ci
npm run lint
react-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.x"
- run: |
cd react
npm ci
npm run lint
69 changes: 69 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Publish Package to npmjs

on:
push:

jobs:
vue-publish:
runs-on: ubuntu-latest
needs: vue-lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: |
cd react
npm ci
npm run build
# Check if the version already exists on npm
- name: Check Version Existence
id: check_version
run: |
if npm show @canopassoftware/[email protected]; then
echo "Version already published. Skipping npm publish."
echo "::set-output name=skip_publish::true"
else
echo "::set-output name=skip_publish::false"
fi
# Publish only if the version check passed
- name: Publish to npm
if: steps.check_version.outputs.skip_publish != true
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

react-publish:
runs-on: ubuntu-latest
needs: react-lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: |
cd react
npm ci
npm run build
# Check if the version already exists on npm
- name: Check Version Existence
id: check_version
run: |
if npm show @canopassoftware/[email protected]; then
echo "Version already published. Skipping npm publish."
echo "::set-output name=skip_publish::true"
else
echo "::set-output name=skip_publish::false"
fi
# Publish only if the version check passed
- name: Publish to npm
if: steps.check_version.outputs.skip_publish != true
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@canopassoftware/react-file-upload",
"version": "1.2.0",
"version": "1.1.34",
"description": "Show the preview of file and manage files data to upload",
"main": "index.umd.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@canopassoftware/vue-file-upload",
"version": "1.0.6",
"version": "1.0.5",
"description": "Show the preview of file and manage files data to upload",
"main": "./dist/index.umd.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion vue/tailwind.config.js → vue/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
extend: {}
},
variants: {
extend: {},
extend: {}
},
plugins: []
}

0 comments on commit fdb45d4

Please sign in to comment.