Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sign-off release commit and do not publish src #1922

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/commit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { execSync } = require('node:child_process')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AH thats annoying... Does changesets still offer enough value if we have to do things like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure -- it seems the amount of scripts is now similar to our previous approach. It is a bit less hacky which I like. But I'll keep looking further to an alternative. Maybe NX, or back to the lerna setup.


const getSignedOffBy = () => {
const gitUserName = execSync('git config user.name').toString('utf-8').trim()
const gitEmail = execSync('git config user.email').toString('utf-8').trim()

return `Signed-off-by: ${gitUserName} <${gitEmail}>`
}

const getAddMessage = async (changeset) => {
return `docs(changeset): ${changeset.summary}\n\n${getSignedOffBy()}\n`
}

const getVersionMessage = async (releasePlan) => {
const publishableReleases = releasePlan.releases.filter((release) => release.type !== 'none')
const releasedVersion = publishableReleases[0].newVersion

return `chore(release): version ${releasedVersion}\n\n${getSignedOffBy()}\n`
}

module.exports = {
getAddMessage,
getVersionMessage,
}
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": true,
"commit": "./commit",
"privatePackages": false,
"fixed": [["@credo-ts/*"]],
"access": "public",
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
- main
- '**-pre'

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
pull-requests: write
contents: write
Expand Down Expand Up @@ -40,16 +38,26 @@ jobs:
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
commit: 'chore(release): new version'
title: 'chore(release): new version'
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}

- name: Get current package version
id: get_version
run: echo "CURRENT_PACKAGE_VERSION=$(node -p "require('./packages/core/package.json').version")" >> $GITHUB_ENV

- name: Create Github Release
if: steps.changesets.outputs.published == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.CURRENT_PACKAGE_VERSION }}

release-unstable:
name: Release Unstable
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore(release): new version')"
if: "!startsWith(github.event.head_commit.message, 'chore(release): version')"
steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"rxjs": "^7.8.0",
"ts-jest": "^29.1.2",
"ts-node": "^10.0.0",
"tsconfig-paths": "^4.1.2",
"tsyringe": "^4.8.0",
"typescript": "~5.5.2",
"ws": "^8.13.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/action-menu/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/action-menu",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/action-menu",
Expand Down
6 changes: 3 additions & 3 deletions packages/anoncreds/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/anoncreds",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/anoncreds",
Expand Down
6 changes: 3 additions & 3 deletions packages/askar/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/askar",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/askar",
Expand Down
6 changes: 3 additions & 3 deletions packages/bbs-signatures/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/bbs-signatures",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/bbs-signatures",
Expand Down
6 changes: 3 additions & 3 deletions packages/cheqd/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/cheqd",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/cheqd",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/core",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/core",
Expand Down
6 changes: 3 additions & 3 deletions packages/drpc/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/drpc",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/drpc",
Expand Down
6 changes: 3 additions & 3 deletions packages/indy-sdk-to-askar-migration/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/indy-sdk-to-askar-migration",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/indy-sdk-to-askar-migration",
Expand Down
6 changes: 3 additions & 3 deletions packages/indy-vdr/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/indy-vdr",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/indy-vdr",
Expand Down
6 changes: 3 additions & 3 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/node",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/node",
Expand Down
6 changes: 3 additions & 3 deletions packages/openid4vc/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/openid4vc",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/openid4vc",
Expand Down
6 changes: 3 additions & 3 deletions packages/question-answer/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/question-answer",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/question-answer",
Expand Down
6 changes: 3 additions & 3 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/react-native",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/react-native",
Expand Down
6 changes: 3 additions & 3 deletions packages/tenants/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@credo-ts/tenants",
"main": "build/index",
"main": "src/index",
"types": "src/index",
"version": "0.5.6",
"files": [
"!src/**/__tests__",
"src",
"build"
],
"license": "Apache-2.0",
"publishConfig": {
"main": "build/index",
"types": "build/index",
"access": "public"
},
"homepage": "https://github.com/openwallet-foundation/credo-ts/tree/main/packages/tenants",
Expand Down
13 changes: 0 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"extends": "./tsconfig.build.json",
"ts-node": {
"require": ["tsconfig-paths/register"],
"files": true
},
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@credo-ts/*": ["packages/*/src"]
},
"types": ["jest", "node"]
},
"exclude": ["node_modules", "**/build/**"]
Expand Down
Loading
Loading