Skip to content

Commit d6c6fff

Browse files
committed
feat(core): adds fetchClient
1 parent a737c34 commit d6c6fff

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 'latest'
20+
cache: npm
21+
cache-dependency-path: package-lock.json
22+
23+
- name: Install dependencies
24+
run: npm i --legacy-peer-deps
25+
26+
- name: Build packages
27+
run: npm run build
28+
29+
- name: Semantic release
30+
run: npx semantic-release
31+
32+
- name: Import GPG key
33+
uses: crazy-max/ghaction-import-gpg@v6
34+
with:
35+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
36+
37+
- name: Update version in source code
38+
run: |
39+
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
40+
version=${latest_tag#v}
41+
bash release.sh $version ${{ secrets.GPG_KEY_ID }}
42+
43+
- name: build demo
44+
run: npm run build:demo

release.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# Get the first argument
4+
next_version=$1
5+
6+
# Path to the package.json file
7+
PACKAGE_JSON_FILE="react-kit/package.json"
8+
PACKAGE_JSON_FILE2="package.json"
9+
10+
# Update the version in package.json
11+
jq --arg v "$next_version" '.version = $v' "$PACKAGE_JSON_FILE" > "tmp.json" && mv "tmp.json" "$PACKAGE_JSON_FILE"
12+
jq --arg v "$next_version" '.version = $v' "$PACKAGE_JSON_FILE2" > "tmp2.json" && mv "tmp2.json" "$PACKAGE_JSON_FILE2"
13+
14+
# Build the commit message
15+
commit_message="chore: bump version to $next_version"
16+
17+
# Set the git user
18+
git config user.name "Pavan Kumar Jadda"
19+
git config user.email 17564080+pavankjadda@users.noreply.github.com
20+
git config user.signingkey "$2"
21+
git config commit.gpgsign true
22+
23+
# Make the git commit with the message
24+
git add .
25+
git commit -m "$commit_message"
26+
27+
# Push the commit
28+
git push

0 commit comments

Comments
 (0)