Skip to content

Commit

Permalink
Trying to create release without creating tag first
Browse files Browse the repository at this point in the history
"If a matching git tag does not yet exist, one will automatically get created from the latest state of the default branch"

https://cli.github.com/manual/gh_release_create
  • Loading branch information
LuisEnMarroquin committed Dec 18, 2021
1 parent 3cc0ffb commit 57cbc9e
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 @@ -20,16 +20,16 @@ jobs:
echo "TAG_VERSION=$(git describe --abbrev=0)" >> $GITHUB_ENV
echo "CURRENT_VERSION=$(node -e "console.log('v' + require('./package.json').version)")" >> $GITHUB_ENV
echo Environment has TAG_VERSION ${{ env.TAG_VERSION }} and CURRENT_VERSION ${{ env.CURRENT_VERSION }}
- name: Create tag with Git
if: ${{ env.TAG_VERSION != env.CURRENT_VERSION }}
run: |
git tag -a -m "Published ${{ env.CURRENT_VERSION }}" ${{ env.CURRENT_VERSION }}
git push --follow-tags
- 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
env:
NPM_AUTH_TOKEN: ${{ secrets.TOKEN_NPM }}
# - name: Create tag with Git
# if: ${{ env.TAG_VERSION != env.CURRENT_VERSION }}
# run: |
# git tag -a -m "Published ${{ env.CURRENT_VERSION }}" ${{ env.CURRENT_VERSION }}
# git push --follow-tags
# - 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
# env:
# NPM_AUTH_TOKEN: ${{ secrets.TOKEN_NPM }}
- name: Create GitHub release
if: ${{ env.TAG_VERSION != env.CURRENT_VERSION }}
run: |
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.5",
"version": "2.3.6",
"main": "index.js",
"license": "MIT",
"types": "types/index.d.ts",
Expand Down

0 comments on commit 57cbc9e

Please sign in to comment.