Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 6cfe740

Browse files
author
Lisi Linhart
authored
Merge pull request #20 from storyblok/chore/update-release
chore: add semantic release
2 parents cbeea63 + 78d44a9 commit 6cfe740

File tree

7 files changed

+3456
-7776
lines changed

7 files changed

+3456
-7776
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,22 @@ name: Release
44
on:
55
push:
66
branches:
7-
- release
7+
- main
88

99
jobs:
10-
build:
10+
release:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v2
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 14
17-
- run: npm ci
16+
node-version: 16
17+
cache: 'yarn'
18+
- name: Install dependencies
19+
run: yarn --frozen-lockfile
1820
- run: npm test
19-
20-
publish-npm:
21-
needs: build
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@v2
25-
- uses: actions/setup-node@v2
26-
with:
27-
node-version: 14
28-
registry-url: https://registry.npmjs.org/
29-
- run: npm ci
30-
- run: npm publish
31-
env:
32-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
33-
34-
publish-gpr:
35-
needs: publish-npm
36-
runs-on: ubuntu-latest
37-
permissions:
38-
contents: read
39-
packages: write
40-
steps:
41-
- uses: actions/checkout@v2
42-
- uses: actions/setup-node@v2
43-
with:
44-
node-version: 14
45-
registry-url: https://npm.pkg.github.com/
46-
- run: npm ci
47-
- run: npm publish
21+
- name: Release
4822
env:
49-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}
25+
run: npx semantic-release

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no -- commitlint --edit ${1}

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run lint

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@commitlint/config-conventional']}

0 commit comments

Comments
 (0)