Skip to content

Commit f5ba2fc

Browse files
authored
chore(ci): set up automated releases (#535)
1 parent 89c043a commit f5ba2fc

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Continuous integration (release)
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
automated-releases:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: 22
14+
cache: npm
15+
token: ${{ secrets.NPM_TOKEN }}
16+
cache-dependency-path: 'package-lock.json'
17+
- run: npm run release:lint
18+
- run: npm run release:test-ci
19+
- run: npm run release:check
20+
- run: npm run release:build
21+
- run: >
22+
npx
23+
-p "@semantic-release/commit-analyzer"
24+
-p "@semantic-release/release-notes-generator"
25+
-p conventional-changelog-conventionalcommits
26+
-p semantic-release
27+
-- semantic-release
28+
permissions:
29+
# packages: write # This is for pushing it to githubs package repository
30+
contents: write
31+
issues: write # This is for posting to issues that they are resolved in a release
32+
pull-requests: write # This is for posting to PRs that they are part of a release
33+
id-token: write # This is for provenance, see https://github.com/semantic-release/npm

.releaserc.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
[
5+
"@semantic-release/commit-analyzer",
6+
{
7+
"preset": "conventionalcommits"
8+
}
9+
],
10+
[
11+
"@semantic-release/npm",
12+
{
13+
"pkgRoot": "package",
14+
"tarballDir": "tars",
15+
"npmPublish": false
16+
}
17+
],
18+
[
19+
"@semantic-release/npm",
20+
{
21+
"pkgRoot": "package-vanilla",
22+
"tarballDir": "tars",
23+
"npmPublish": false
24+
}
25+
],
26+
[
27+
"@semantic-release/github",
28+
{
29+
"assets": "tars/*.tgz"
30+
}
31+
],
32+
"@semantic-release/release-notes-generator"
33+
]
34+
}

0 commit comments

Comments
 (0)