Skip to content

Commit

Permalink
Using a single action in the entire project
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisEnMarroquin committed Dec 18, 2021
1 parent 8d4e4cd commit 56f5007
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build JavaScript file
run: npm ci && npm run build
run: |
npm ci
npm run build
- name: Set environment variables
run: |
echo "TAG_VERSION=$(git describe --abbrev=0)" >> $GITHUB_ENV
echo "CURRENT_VERSION=$(node -e "console.log('v' + require('./package.json').version)")" >> $GITHUB_ENV
echo Env TAG_VERSION ${{ env.TAG_VERSION }} and CURRENT_VERSION ${{ env.CURRENT_VERSION }}
- name: Publish package to NPM
if: ${{ env.TAG_VERSION != env.CURRENT_VERSION }}
run: echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc && npm publish --access public
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
npm publish --access public
env:
NPM_AUTH_TOKEN: ${{ secrets.TOKEN_NPM }}
- name: Create GitHub release
Expand All @@ -28,14 +32,10 @@ jobs:
echo ${{ secrets.TOKEN_GITHUB }} > nothing.md
gh auth login --with-token < nothing.md
gh release create ${{ env.CURRENT_VERSION }} -F README.md -t "Released ${{ env.CURRENT_VERSION }}"
github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npm run build
- run: npm run build-client
- run: cp CNAME dist/CNAME
- name: Build VueJS project
run: |
npm run build-client
cp CNAME dist/CNAME
- uses: JamesIves/github-pages-deploy-action@4.1.7
with:
folder: dist
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "json-as-xlsx",
"version": "2.3.7",
"version": "2.3.8",
"main": "index.js",
"license": "MIT",
"types": "types/index.d.ts",
Expand Down

0 comments on commit 56f5007

Please sign in to comment.