Skip to content

Commit 4566765

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

File tree

9 files changed

+1428
-4296
lines changed

9 files changed

+1428
-4296
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: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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: rust toolchain
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: stable
39+
profile: minimal
40+
target: wasm32-wasi
41+
42+
- name: yarn install
43+
shell: bash
44+
run: yarn --frozen-lockfile --no-progress --non-interactive --prefer-offline || yarn install --check-cache
45+
46+
- uses: actions/cache@v3
47+
id: "rust_cache_hits"
48+
if: ${{ inputs.rust_cache_enable }}
49+
with:
50+
path: |
51+
~/.cargo/bin/
52+
~/.cargo/registry/index/
53+
~/.cargo/registry/cache/
54+
~/.cargo/git/db/
55+
/usr/share/rust/.rustup
56+
**/target
57+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

.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: 52 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,72 @@
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+
21+
- name: validate (lint)
22+
run: yarn lint
23+
4224
- name: Build
43-
run: yarn run build
25+
run: yarn build
26+
4427
- name: Test
45-
env:
46-
CI: true
47-
run: yarn run test --coverage
28+
run: yarn test
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v4
4832

49-
publish:
50-
needs: tests
51-
name: Publish to Github & NPM or Github Package Registry
33+
release:
34+
needs:
35+
- build
5236
runs-on: ubuntu-latest
5337
steps:
5438
- 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
39+
- uses: ./.github/actions/setup
40+
- name: Build
41+
run: yarn build
42+
43+
- name: Semantic Release
44+
uses: cycjimmy/semantic-release-action@v4
6645
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()
46+
semantic_version: 19.0.2
47+
branches: |
48+
[
49+
'+([0-9])?(.{+([0-9]),x}).x',
50+
'main',
51+
'next',
52+
'next-major',
53+
{
54+
name: 'beta',
55+
prerelease: true
56+
},
57+
{
58+
name: 'alpha',
59+
prerelease: true
60+
}
61+
]
62+
extra_plugins: |
63+
@semantic-release/changelog
64+
@semantic-release/git
65+
@semrel-extra/npm
7966
env:
80-
CI: true
81-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
8267
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
8368
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
84-
run: yarn semantic-release
69+
GIT_AUTHOR_EMAIL: "[email protected]"
70+
GIT_COMMITTER_EMAIL: "[email protected]"
71+
GIT_AUTHOR_NAME: "anakmagang"
72+
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"]

0 commit comments

Comments
 (0)