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

feat: release automation changes #832

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: npm list
- run: npm ci
- run: npm audit
- run: npm publish
- run: npm publish -ws
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
7 changes: 6 additions & 1 deletion bin/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import fs from 'fs';
import path from 'path';
import { exec } from 'child_process';
import prettier from 'prettier';
import process from 'process';

console.time('script duration');
Expand Down Expand Up @@ -52,8 +53,12 @@ workspaces.forEach(async workspace => {
json.devDependencies = updateDeps(json.devDependencies);
}

const formatted = prettier.format(JSON.stringify(json), {
parser: 'json-stringify',
});

// Write file
fs.writeFileSync(packagePath, JSON.stringify(json));
fs.writeFileSync(packagePath, formatted);
});

function updateDeps(dependencies: Record<string, string>) {
Expand Down
1 change: 1 addition & 0 deletions docs/generated/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>Agent-JS Changelog</h1>
<section>
<h2>Version x.x.x</h2>
<ul>
<li>feat: release automation changes</li>
<li>fix: distinguish remote dev environments from known hosts</li>
</ul>
<h2>Version 0.21.2</h2>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"git push --set-upstream origin release/${version}"
],
"after:release": [
"gh pr create --base main --title 'chore: release ${version}' --body 'GitHub Release: ${releaseUrl}\nNPM release: https://www.npmjs.com/package/@dfinity/agent/v/${version}'"
"gh pr create --base main --title 'chore: release ${version}' --body 'GitHub Release: ${releaseUrl}\nNPM release: https://www.npmjs.com/package/@dfinity/agent/v/${version}'`n[ ] Check this box to trigger CI"
]
},
"git": {
Expand Down
Loading