-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd5e8dd
commit fdb45d4
Showing
6 changed files
with
105 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ module.exports = { | |
extend: {} | ||
}, | ||
variants: { | ||
extend: {}, | ||
extend: {} | ||
}, | ||
plugins: [] | ||
} |