Skip to content

Commit 041e2fe

Browse files
committed
docs: update github workflow
1 parent c081c16 commit 041e2fe

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/workflows/publish.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
name: publish
22

33
on:
4-
push:
5-
tags:
6-
- v*
74
release:
85
types: [published, released]
9-
10-
# Allows you to run this workflow manually from the Actions tab
116
workflow_dispatch:
127

138
jobs:

.github/workflows/release.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,26 @@ jobs:
3838
github_token: ${{ secrets.GITHUB_TOKEN }}
3939
default_bump: ${{ inputs.semver }}
4040
custom_tag: ${{ inputs.custom_version }}
41-
dry_run: 'true'
41+
dry_run: "true"
4242

4343
- name: Bump version and push tag
4444
if: inputs.dry_run == false
45-
uses: reedyuk/[email protected]
46-
with:
47-
version: ${{ steps.tag_version.outputs.new_version }}
48-
git-tag-version: 'true'
45+
run: |
46+
# Configure Git
47+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
48+
git config --local user.name "github-actions[bot]"
49+
50+
# Update package.json version
51+
npm version ${{ steps.tag_version.outputs.new_version }} --no-git-tag-version
52+
53+
# Commit changes
54+
git add package.json
55+
git commit -m "release: bump version into ${{ steps.tag_version.outputs.new_tag }}"
56+
git push
57+
58+
# Create and push tag
59+
git tag ${{ steps.tag_version.outputs.new_tag }}
60+
git push origin ${{ steps.tag_version.outputs.new_tag }}
4961
5062
- name: Create a GitHub release
5163
if: inputs.dry_run == false
@@ -60,4 +72,4 @@ jobs:
6072
uses: benc-uk/workflow-dispatch@v1
6173
if: inputs.dry_run == false
6274
with:
63-
workflow: publish.yml
75+
workflow: publish.yaml

0 commit comments

Comments
 (0)