Skip to content

Commit bfa5f62

Browse files
committed
ci: update release configurations
1 parent c9a8072 commit bfa5f62

File tree

9 files changed

+1405
-4297
lines changed

9 files changed

+1405
-4297
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
31+
- Nodejs Version
32+
33+
**Smartphone (please complete the following information):**
34+
35+
- Device: [e.g. iPhone6]
36+
- OS: [e.g. iOS8.1]
37+
- Browser [e.g. stock browser, safari]
38+
- Version [e.g. 22]
39+
- Nodejs Version
40+
41+
**Additional context**
42+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/actions/setup/action.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Setup
2+
3+
description: Setup Node.js, cache and install dependencies (using yarn specificly)
4+
5+
inputs:
6+
node_version:
7+
description: Node.js version
8+
required: false
9+
default: "20"
10+
rust_cache_enable:
11+
description: enable actions/cache@v3 for rust
12+
required: false
13+
default: "false"
14+
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Checkout all commits
19+
uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup git user to "anakmagang"
24+
shell: bash
25+
run: |
26+
git config user.email "[email protected]"
27+
git config user.name "anakmagang"
28+
29+
- name: Use Node.js
30+
uses: actions/setup-node@v3
31+
with:
32+
cache: yarn
33+
node-version: ${{ inputs.node_version }}
34+
35+
- name: yarn install
36+
shell: bash
37+
run: yarn install --immutable

.github/dependabot.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7-
8-
- package-ecosystem: npm
9-
directory: /
7+
- directory: /
108
assignees:
119
- "r17x"
1210
open-pull-requests-limit: 5
11+
package-ecosystem: npm
1312
rebase-strategy: auto
1413
schedule:
1514
interval: daily

.github/workflows/release.yml

Lines changed: 49 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,69 @@
1-
name: Publish
2-
1+
name: release
32
on:
43
push:
54
branches:
6-
- "[12].[0-9x]+.[0-9x]+"
75
- main
86
- next
9-
- alpha
10-
- beta
11-
7+
pull_request:
8+
branches:
9+
- main
10+
- next
1211
jobs:
13-
tests:
14-
name: Test or Build
12+
build:
1513
runs-on: ubuntu-latest
1614
steps:
1715
- uses: actions/checkout@v4
18-
- name: Setup node
19-
uses: actions/setup-node@v4
20-
with:
21-
node-version: 20
22-
- id: vars
23-
name: Find Yarn's cache folder
24-
run: |
25-
echo "::set-output name=path::$(yarn config get cacheFolder)"
26-
echo "::set-output name=commithash::$(git rev-parse --short HEAD)"
27-
- name: Cache node modules
28-
uses: actions/cache@v4
29-
id: yarn-cache
30-
with:
31-
path: ${{ steps.vars.outputs.path }}
32-
key: ${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-${{ hashFiles('**/yarn.lock') }}
33-
restore-keys: |
34-
${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-
35-
- name: Install dependencies
36-
# if: ${{ !steps.yarn-cache.outputs.cache-hit }}
16+
- uses: ./.github/actions/setup
17+
- uses: wagoid/commitlint-github-action@v6
3718
env:
38-
CI: true
39-
run: |
40-
yarn install
41-
yarn ci
19+
NODE_PATH: ${{ github.workspace }}/node_modules
20+
4221
- name: Build
43-
run: yarn run build
22+
run: yarn build
23+
4424
- name: Test
45-
env:
46-
CI: true
47-
run: yarn run test --coverage
25+
run: yarn test
4826

49-
publish:
50-
needs: tests
51-
name: Publish to Github & NPM or Github Package Registry
27+
- name: Upload coverage to Codecov
28+
uses: codecov/codecov-action@v4
29+
30+
release:
31+
needs:
32+
- build
5233
runs-on: ubuntu-latest
5334
steps:
5435
- uses: actions/checkout@v4
55-
- uses: actions/setup-node@v4
56-
with:
57-
node-version: 12
58-
- id: vars
59-
name: Find Yarn's cache folder
60-
run: |
61-
echo "::set-output name=path::$(yarn config get cacheFolder)"
62-
echo "::set-output name=commithash::$(git rev-parse --short HEAD)"
63-
- name: Cache node modules
64-
uses: actions/cache@v4
65-
id: yarn-cache
36+
- uses: ./.github/actions/setup
37+
- name: Build
38+
run: yarn build
39+
40+
- name: Semantic Release
41+
uses: cycjimmy/semantic-release-action@v4
6642
with:
67-
path: ${{ steps.vars.outputs.path }}
68-
key: ${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-${{ hashFiles('**/yarn.lock') }}
69-
restore-keys: |
70-
${{ runner.os }}-yarn-${{ steps.vars.outputs.commithash }}-
71-
- name: Install dependencies
72-
# if: ${{ !steps.yarn-cache.outputs.cache-hit }}
73-
env:
74-
CI: true
75-
run: |
76-
yarn install
77-
yarn ci
78-
- if: success()
43+
semantic_version: 19.0.2
44+
branches: |
45+
[
46+
'+([0-9])?(.{+([0-9]),x}).x',
47+
'main',
48+
'next',
49+
'next-major',
50+
{
51+
name: 'beta',
52+
prerelease: true
53+
},
54+
{
55+
name: 'alpha',
56+
prerelease: true
57+
}
58+
]
59+
extra_plugins: |
60+
@semantic-release/changelog
61+
@semantic-release/git
62+
@semrel-extra/npm
7963
env:
80-
CI: true
81-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
8264
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
8365
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
84-
run: yarn semantic-release
66+
GIT_AUTHOR_EMAIL: "[email protected]"
67+
GIT_COMMITTER_EMAIL: "[email protected]"
68+
GIT_AUTHOR_NAME: "anakmagang"
69+
GIT_COMMITTER_NAME: "anakmagang"

.github/workflows/test.release.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.kodiak.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version = 1
2+
3+
[approve]
4+
auto_approve_usernames = ["dependabot"]
5+
6+
[merge]
7+
method = "rebase_fast_forward"
8+
prioritize_ready_to_merge = true
9+
10+
[merge.automerge_dependencies]
11+
usernames = ["dependabot"]
12+
versions = ["minor", "patch"]
13+
14+
[merge.message]
15+
body = "pull_request_body"
16+
body_type = "markdown"
17+
include_pr_number = true
18+
strip_html_comments = true
19+
title = "pull_request_title"
20+
21+
[update]
22+
always = true
23+
ignored_usernames = ["dependabot"]

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
"src/**/*.rei",
2121
"src/**/*.res",
2222
"src/**/*.resi",
23-
"bsconfig.json"
23+
"rescript.json"
2424
],
2525
"repository": "https://github.com/rescript-ui/rescript-chakra",
2626
"bugs": "https://github.com/rescript-ui/rescript-chakra/issues",
27+
"packageManager": "[email protected]",
2728
"scripts": {
2829
"start": "rescript build -w",
2930
"prebuild": "rescript clean",
3031
"build": "rescript build -with-deps",
3132
"clean": "rescript clean",
32-
"semantic-release": "semantic-release",
3333
"ci": "yarn install --immutable",
3434
"pretest": "yarn build",
3535
"test": "vitest run",
@@ -53,6 +53,9 @@
5353
"@emotion/react": "11.4.1",
5454
"@emotion/styled": "11.3.0",
5555
"@rescript/react": "0.13.0",
56+
"@semantic-release/changelog": "^6.0.3",
57+
"@semantic-release/git": "10.0.1",
58+
"@semrel-extra/npm": "1.2.0",
5659
"@vitest/coverage-v8": "^2.0.5",
5760
"framer-motion": "4.1.17",
5861
"husky": "7.0.2",
@@ -63,8 +66,7 @@
6366
"react-dom": "17.0.2",
6467
"rescript": "^11",
6568
"rescript-vitest": "^1.4.0",
66-
"semantic-release": "17.4.4",
67-
"semantic-release-npm-github-publish": "1.4.0",
69+
"semantic-release": "19.0.2",
6870
"vitest": "^2.0.5"
6971
},
7072
"peerDependencies": {

0 commit comments

Comments
 (0)