Skip to content

Commit f5609ae

Browse files
Merge pull request #5 from Codegyan-LLC/dev
add permission to git action file
2 parents 4f5e302 + 9f0f84b commit f5609ae

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
name: Release & Publish
1+
name: Git Package Release & Publish oon NPM
22

33
on:
44
push:
55
branches:
66
- main
77

8+
permissions:
9+
contents: write # needed to push commits, tags, and create releases
10+
packages: write # needed for publishing GitHub packages (optional)
11+
812
jobs:
913
release:
1014
runs-on: ubuntu-latest
@@ -28,19 +32,14 @@ jobs:
2832
git config user.name "github-actions[bot]"
2933
git config user.email "github-actions[bot]@users.noreply.github.com"
3034
31-
# Install deps
35+
# Install dependencies
3236
- name: Install dependencies
3337
run: npm install
3438

3539
# Bump version dynamically
3640
- name: Bump version
3741
id: version
3842
run: |
39-
40-
# gitbot
41-
git config user.name "github-actions[bot]"
42-
git config user.email "github-actions[bot]@users.noreply.github.com"
43-
4443
NEW_VERSION=$(npm version patch -m "chore(release): v%s [skip ci]")
4544
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
4645
@@ -64,6 +63,7 @@ jobs:
6463
publish-npm:
6564
needs: release # ⬅ Runs only after release is successful
6665
runs-on: ubuntu-latest
66+
6767
steps:
6868
- name: Checkout code
6969
uses: actions/checkout@v4

0 commit comments

Comments
 (0)