-
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
114ba33
commit d709814
Showing
1 changed file
with
0 additions
and
20 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 |
---|---|---|
|
@@ -43,26 +43,6 @@ jobs: | |
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Extract version from tag | ||
if: startsWith(github.ref, 'refs/tags/') | ||
id: extract_version | ||
run: echo "::set-output name=VERSION::${GITHUB_REF#refs/tags/v}" | ||
|
||
- name: Update package.json version | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
VERSION=$(echo "${{ steps.extract_version.outputs.VERSION }}" | sed 's/^v//') | ||
npm version $VERSION --no-git-tag-version | ||
- name: Commit version bump if tag | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
git config --global user.name 'hoanghuy' | ||
git config --global user.email '[email protected]' | ||
git add package.json | ||
git commit -m "Bump version to ${{ steps.extract_version.outputs.VERSION }}" | ||
git push origin HEAD:${GITHUB_REF#refs/heads/} | ||
- name: Publish Package | ||
run: npm publish | ||
env: | ||
|