Skip to content

Commit d9426c2

Browse files
authored
Merge pull request #15 from hypercerts-org/develop
Develop
2 parents 545f047 + a84622d commit d9426c2

File tree

14 files changed

+515
-87
lines changed

14 files changed

+515
-87
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and release - staging
1+
name: Build and test - staging
22

33
on:
44
pull_request:

.github/workflows/create-prerelease-sdk.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: Build and release - staging
33
on:
44
push:
55
branches:
6-
- main
7-
- dev/*
8-
- develop/*
6+
- develop
97

108
jobs:
119
build-and-test:
@@ -64,6 +62,9 @@ jobs:
6462
node-version: 20
6563
cache: 'pnpm'
6664

65+
- name: Install dependencies
66+
run: pnpm install
67+
6768
- name: Prepare prerelease semantic
6869
if: github.ref != 'refs/heads/main'
6970
run: mv .releaserc.prerelease.yaml .releaserc.yaml
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build and release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-test:
10+
name: Build and test
11+
runs-on: ubuntu-latest
12+
environment: test
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install Foundry
18+
uses: foundry-rs/foundry-toolchain@v1
19+
20+
- uses: pnpm/action-setup@v4
21+
name: Install pnpm
22+
with:
23+
run_install: false
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Run tests
35+
run: pnpm test
36+
37+
semantic-release:
38+
needs: build-and-test
39+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
40+
41+
name: Semantic Release
42+
runs-on: ubuntu-latest
43+
environment: staging
44+
permissions:
45+
contents: write # to be able to publish a GitHub release
46+
issues: write # to be able to comment on released issues
47+
pull-requests: write # to be able to comment on released pull requests
48+
id-token: write # to enable use of OIDC for npm provenance
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 0
55+
persist-credentials: false
56+
57+
- uses: pnpm/action-setup@v4
58+
name: Install pnpm
59+
with:
60+
run_install: false
61+
62+
- name: Install Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: 20
66+
cache: 'pnpm'
67+
68+
- name: Install dependencies
69+
run: pnpm install
70+
71+
- name: Semantic Release
72+
uses: cycjimmy/semantic-release-action@v4
73+
id: semantic # Need an `id` for output variables
74+
with:
75+
extra_plugins: |
76+
@semantic-release/commit-analyzer
77+
@semantic-release/release-notes-generator
78+
@semantic-release/changelog
79+
@semantic-release/github
80+
@semantic-release/npm
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GH_PA_TOKEN }}
83+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
84+
85+
- name: Do something when a new release published
86+
if: steps.semantic.outputs.new_release_published == 'true'
87+
run: |
88+
echo ${{ steps.semantic.outputs.new_release_version }}
89+
echo ${{ steps.semantic.outputs.new_release_major_version }}
90+
echo ${{ steps.semantic.outputs.new_release_minor_version }}
91+
echo ${{ steps.semantic.outputs.new_release_patch_version }}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build and release - staging
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build-and-test:
8+
name: Build and test
9+
runs-on: ubuntu-latest
10+
environment: test
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Foundry
16+
uses: foundry-rs/foundry-toolchain@v1
17+
18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
20+
with:
21+
run_install: false
22+
23+
- name: Install Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Run tests
33+
run: pnpm test
34+
35+
semantic-release:
36+
needs: build-and-test
37+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
38+
39+
name: Semantic Release
40+
runs-on: ubuntu-latest
41+
environment: staging
42+
permissions:
43+
contents: write
44+
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v4
48+
with:
49+
fetch-depth: 0
50+
persist-credentials: false
51+
52+
- uses: pnpm/action-setup@v4
53+
name: Install pnpm
54+
with:
55+
run_install: false
56+
57+
- name: Install Node.js
58+
uses: actions/setup-node@v4
59+
with:
60+
node-version: 20
61+
cache: 'pnpm'
62+
63+
- name: Install dependencies
64+
run: pnpm install
65+
66+
- name: Prepare prerelease semantic
67+
if: github.ref != 'refs/heads/main'
68+
run: mv .releaserc.prerelease.yaml .releaserc.yaml
69+
70+
- name: Semantic Release
71+
uses: cycjimmy/semantic-release-action@v4
72+
id: semantic # Need an `id` for output variables
73+
with:
74+
dry_run: true
75+
extra_plugins: |
76+
@semantic-release/commit-analyzer
77+
@semantic-release/release-notes-generator
78+
@semantic-release/changelog
79+
@semantic-release/github
80+
@semantic-release/npm
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GH_PA_TOKEN }}
83+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
84+
85+
- name: Do something when a new release published
86+
if: steps.semantic.outputs.new_release_published == 'true'
87+
run: |
88+
echo ${{ steps.semantic.outputs.new_release_version }}
89+
echo ${{ steps.semantic.outputs.new_release_major_version }}
90+
echo ${{ steps.semantic.outputs.new_release_minor_version }}
91+
echo ${{ steps.semantic.outputs.new_release_patch_version }}

.releaserc.prerelease.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,5 @@ plugins:
88
branches:
99
- "+([0-9])?(.{+([0-9]),x}).x"
1010
- main
11-
- name: dev/*
12-
prerelease: "beta"
13-
- name: develop/*
14-
prerelease: 'beta'
15-
- name: hotfix/*
16-
prerelease: '${name.replace(/^hotfix\//g, "fix-").replace(/\//g, "-")}'
17-
- name: fix/*
18-
prerelease: '${name.replace(/^fix\//g, "fix-").replace(/\//g, "-")}'
19-
- name: feat/init
11+
- name: develop
2012
prerelease: 'beta'

.releaserc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ plugins:
22
- "@semantic-release/commit-analyzer"
33
- "@semantic-release/release-notes-generator"
44
- "@semantic-release/changelog"
5-
- "@semantic-release/git"
65
- "@semantic-release/github"
76
- "@semantic-release/npm"
87

eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import tseslint from "typescript-eslint";
44

55

66
export default [
7-
{files: ["**/*.{js,mjs,cjs,ts}"]},
8-
{languageOptions: { globals: {...globals.browser, ...globals.node} }},
7+
{ files: ["**/*.{js,mjs,cjs,ts}"] },
8+
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
99
pluginJs.configs.recommended,
1010
...tseslint.configs.recommended,
1111
];

lib/hypercerts-api

Submodule hypercerts-api updated 124 files

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hypercerts-org/sdk",
3-
"version": "2.0.0-alpha.37",
3+
"version": "2.1.1",
44
"description": "SDK for hypercerts protocol",
55
"repository": "[email protected]:hypercerts-org/hypercerts-sdk.git",
66
"author": "Hypercerts team",
@@ -22,7 +22,7 @@
2222
],
2323
"dependencies": {
2424
"@graphql-typed-document-node/core": "^3.2.0",
25-
"@hypercerts-org/contracts": "2.0.0-alpha.7",
25+
"@hypercerts-org/contracts": "2.0.0-alpha.9",
2626
"@openzeppelin/merkle-tree": "^1.0.7",
2727
"@swc/core": "^1.6.3",
2828
"ajv": "^8.11.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)