Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-medvedev committed Nov 26, 2023
1 parent cf9a44e commit 22ede53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
IFS='.' read -r major date patch <<< "$published_version"
echo "date=${date}" >> $GITHUB_OUTPUT
echo "patch=${patch}" >> $GITHUB_OUTPUT
echo "Published version: ${published_version} (date: ${date}, patch: ${patch})"
- name: Create new version
id: create_new_version
Expand All @@ -36,16 +37,19 @@ jobs:
new_patch=$(( ${{ steps.get_published_version.outputs.patch }} + 1 ))
new_version="1.${current_date}.${new_patch}"
fi
echo "New version: ${new_version}"
echo "new_version=${new_version}" >> $GITHUB_OUTPUT
- name: Update package version
run: |
git config --global user.name "GitHub"
git config --global user.email "[email protected]"
echo "Updating package version to ${{ steps.create_new_version.outputs.new_version }}"
npm version ${{ steps.create_new_version.outputs.new_version }} --allow-same-version
- name: Create git release
run: |
git tag -a v${{ steps.create_new_version.outputs.new_version }} -m "Release v${{ steps.create_new_version.outputs.new_version }}"
git tag -a v${{ steps.create_new_version.outputs.new_version }} -m "Release v${{ steps.create_new_version.outputs.new_version }}" --force
git push origin v${{ steps.create_new_version.outputs.new_version }}
- name: Publish
Expand Down

0 comments on commit 22ede53

Please sign in to comment.