Skip to content

Commit 0952fca

Browse files
authored
chore: sign-off release commit and do not publish src (openwallet-foundation#1922)
Signed-off-by: Timo Glastra <[email protected]>
1 parent f1cbf6f commit 0952fca

File tree

25 files changed

+173
-175
lines changed

25 files changed

+173
-175
lines changed

.changeset/commit.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const { execSync } = require('node:child_process')
2+
3+
const getSignedOffBy = () => {
4+
const gitUserName = execSync('git config user.name').toString('utf-8').trim()
5+
const gitEmail = execSync('git config user.email').toString('utf-8').trim()
6+
7+
return `Signed-off-by: ${gitUserName} <${gitEmail}>`
8+
}
9+
10+
const getAddMessage = async (changeset) => {
11+
return `docs(changeset): ${changeset.summary}\n\n${getSignedOffBy()}\n`
12+
}
13+
14+
const getVersionMessage = async (releasePlan) => {
15+
const publishableReleases = releasePlan.releases.filter((release) => release.type !== 'none')
16+
const releasedVersion = publishableReleases[0].newVersion
17+
18+
return `chore(release): version ${releasedVersion}\n\n${getSignedOffBy()}\n`
19+
}
20+
21+
module.exports = {
22+
getAddMessage,
23+
getVersionMessage,
24+
}

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
33
"changelog": "@changesets/cli/changelog",
4-
"commit": true,
4+
"commit": "./commit",
55
"privatePackages": false,
66
"fixed": [["@credo-ts/*"]],
77
"access": "public",

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = {
2626
},
2727
},
2828
rules: {
29+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
2930
'@typescript-eslint/explicit-function-return-type': 'off',
3031
'@typescript-eslint/explicit-module-boundary-types': 'off',
3132
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }],

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
- main
77
- '**-pre'
88

9-
concurrency: ${{ github.workflow }}-${{ github.ref }}
10-
119
permissions:
1210
pull-requests: write
1311
contents: write
@@ -40,16 +38,26 @@ jobs:
4038
with:
4139
# This expects you to have a script called release which does a build for your packages and calls changeset publish
4240
publish: pnpm release
43-
commit: 'chore(release): new version'
4441
title: 'chore(release): new version'
42+
createGithubReleases: false
4543
env:
4644
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4745
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}
4846

47+
- name: Get current package version
48+
id: get_version
49+
run: echo "CURRENT_PACKAGE_VERSION=$(node -p "require('./packages/core/package.json').version")" >> $GITHUB_ENV
50+
51+
- name: Create Github Release
52+
if: steps.changesets.outputs.published == 'true'
53+
uses: softprops/action-gh-release@v2
54+
with:
55+
tag_name: v${{ env.CURRENT_PACKAGE_VERSION }}
56+
4957
release-unstable:
5058
name: Release Unstable
5159
runs-on: ubuntu-latest
52-
if: "!startsWith(github.event.head_commit.message, 'chore(release): new version')"
60+
if: "!startsWith(github.event.head_commit.message, 'chore(release): version')"
5361
steps:
5462
- name: Checkout Repo
5563
uses: actions/checkout@v4

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"@types/uuid": "^9.0.1",
4343
"@types/varint": "^6.0.0",
4444
"@types/ws": "^8.5.4",
45-
"@typescript-eslint/eslint-plugin": "^5.48.1",
46-
"@typescript-eslint/parser": "^5.48.1",
45+
"@typescript-eslint/eslint-plugin": "^7.14.1",
46+
"@typescript-eslint/parser": "^7.14.1",
4747
"bn.js": "^5.2.1",
4848
"cors": "^2.8.5",
4949
"eslint": "^8.36.0",
@@ -58,7 +58,6 @@
5858
"rxjs": "^7.8.0",
5959
"ts-jest": "^29.1.2",
6060
"ts-node": "^10.0.0",
61-
"tsconfig-paths": "^4.1.2",
6261
"tsyringe": "^4.8.0",
6362
"typescript": "~5.5.2",
6463
"ws": "^8.13.0"

packages/action-menu/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@credo-ts/action-menu",
3-
"main": "build/index",
3+
"main": "src/index",
44
"types": "src/index",
55
"version": "0.5.6",
66
"files": [
7-
"!src/**/__tests__",
8-
"src",
97
"build"
108
],
119
"license": "Apache-2.0",
1210
"publishConfig": {
11+
"main": "build/index",
12+
"types": "build/index",
1313
"access": "public"
1414
},
1515
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/action-menu",

packages/anoncreds/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@credo-ts/anoncreds",
3-
"main": "build/index",
3+
"main": "src/index",
44
"types": "src/index",
55
"version": "0.5.6",
66
"files": [
7-
"!src/**/__tests__",
8-
"src",
97
"build"
108
],
119
"license": "Apache-2.0",
1210
"publishConfig": {
11+
"main": "build/index",
12+
"types": "build/index",
1313
"access": "public"
1414
},
1515
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/anoncreds",

packages/anoncreds/src/updates/0.4-0.5/anonCredsCredentialRecord.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { fetchCredentialDefinition } from '../../utils/anonCredsObjects'
1616
import {
1717
getIndyNamespaceFromIndyDid,
1818
getQualifiedDidIndyDid,
19-
getUnQualifiedDidIndyDid,
2019
getUnqualifiedRevocationRegistryDefinitionId,
2120
isIndyDid,
2221
isUnqualifiedCredentialDefinitionId,

packages/askar/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@credo-ts/askar",
3-
"main": "build/index",
3+
"main": "src/index",
44
"types": "src/index",
55
"version": "0.5.6",
66
"files": [
7-
"!src/**/__tests__",
8-
"src",
97
"build"
108
],
119
"license": "Apache-2.0",
1210
"publishConfig": {
11+
"main": "build/index",
12+
"types": "build/index",
1313
"access": "public"
1414
},
1515
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/askar",

packages/bbs-signatures/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@credo-ts/bbs-signatures",
3-
"main": "build/index",
3+
"main": "src/index",
44
"types": "src/index",
55
"version": "0.5.6",
66
"files": [
7-
"!src/**/__tests__",
8-
"src",
97
"build"
108
],
119
"license": "Apache-2.0",
1210
"publishConfig": {
11+
"main": "build/index",
12+
"types": "build/index",
1313
"access": "public"
1414
},
1515
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/bbs-signatures",

0 commit comments

Comments
 (0)