Skip to content

Commit 4b81dfc

Browse files
authored
Merge pull request #6 from EnzoVezzaro/development
gh actions according to copilot (will see)
2 parents b8fdca3 + 224e09e commit 4b81dfc

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,18 @@ jobs:
2121
node-version: '20.x'
2222
registry-url: 'https://registry.npmjs.org'
2323

24-
# Extract the version from package.json
25-
- name: Extract version from package.json
26-
id: extract_version
24+
# Automatically bump the version
25+
- name: Bump version
2726
run: |
28-
VERSION=$(node -p "require('./package.json').version")
29-
echo "VERSION=$VERSION" >> $GITHUB_ENV
30-
31-
# Update package.json with the extracted version
32-
- name: Update package.json with version
33-
run: |
34-
echo "Updating package.json version to $VERSION"
35-
npm version "$VERSION" --no-git-tag-version
27+
echo "Bumping version..."
28+
npm version patch --no-git-tag-version
3629
3730
- name: Commit and push version update
3831
run: |
3932
git config user.name "github-actions"
4033
git config user.email "github-actions@github.com"
4134
git add package.json package-lock.json
42-
git commit -m "Update package.json to version $VERSION"
35+
git commit -m "Bump version to $(node -p "require('./package.json').version")"
4336
git push origin main
4437
env:
4538
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)