Skip to content

Commit 02830d4

Browse files
committedOct 27, 2023
chore: add semantic release
1 parent e1cc8dd commit 02830d4

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
 

‎.github/workflows/ci.yml

+22
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,25 @@ jobs:
7070
with:
7171
github_token: ${{ secrets.GITHUB_TOKEN }}
7272
publish_dir: .
73+
74+
release:
75+
if: ${{ github.ref == 'refs/heads/main' }}
76+
needs: [ test, spec ]
77+
runs-on: ubuntu-latest
78+
permissions:
79+
contents: write
80+
packages: write
81+
issues: write
82+
pull-requests: write
83+
steps:
84+
- uses: actions/checkout@v4
85+
- uses: actions/setup-node@v3
86+
with:
87+
node-version: 20.x
88+
- run: npm ci
89+
- run: npm run build
90+
- name: Release
91+
env:
92+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
93+
GITHUB_TOKEN: ${{ github.token }}
94+
run: npx semantic-release@22

‎package.json

+8
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,13 @@
9494
"statements": 100
9595
}
9696
}
97+
},
98+
"release": {
99+
"branches": [
100+
"main"
101+
]
102+
},
103+
"publishConfig": {
104+
"access": "public"
97105
}
98106
}

0 commit comments

Comments
 (0)
Please sign in to comment.