Skip to content

Commit

Permalink
chore: update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ebukaodini committed Mar 15, 2024
1 parent 0453dc3 commit babee8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,19 @@ jobs:
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
echo "require('./package.json').version"
- name: Get package version
id: get-version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"

- name: Publish to npm
id: npm-publish
# run: npm publish --access public --registry=https://registry.npmjs.org/ --tag "require('./package.json').version" --npm-token=${{ secrets.NPM_TOKEN }}
run: |
OUTPUT=$(npm publish --access public --registry=https://registry.npmjs.org/ --tag "require('./package.json').version" --npm-token=${{ secrets.NPM_TOKEN }})
echo "::set-output name=npm-publish-output::$OUTPUT"
run: npm publish --access public --registry=https://registry.npmjs.org/ --tag ${{ steps.get-version.outputs.version }} --npm-token=${{ secrets.NPM_TOKEN }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Display npm publish output
run: |
echo "npm publish output: ${{ steps.npm-publish.outputs.npm-publish-output }}"
- name: Bump version and push tag
if: success()
uses: laputansoft/github-tag-action@v4.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: "require('./package.json').version"
tag: v${{ steps.get-version.outputs.version }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebukaodini/scaffoldjs",
"version": "0.0.7",
"version": "0.0.8",
"description": "Speed up coding with prebuilt and custom template files",
"main": "src/index.js",
"scripts": {
Expand Down

0 comments on commit babee8f

Please sign in to comment.