Skip to content

Commit

Permalink
chore: release-please (#173)
Browse files Browse the repository at this point in the history
* chore: release-please

* chore: remove dry-run on publish

* chore: add linked version
  • Loading branch information
denis-bushaev authored Nov 23, 2023
1 parent d6ab268 commit c9928de
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 39 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
name: New release

# FIXME: Needs refactoring with the new monorepo
on:
- workflow_dispatch
# push:
# branches:
# - main
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
steps:
- name: Release
id: release
uses: google-github-actions/release-please-action@v3
with:
command: manifest

- name: Checkout
uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
publish:
needs: release
name: Publish
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.releases_created }}
steps:
- uses: actions/checkout@v3

- uses: pnpm/[email protected]
with:
version: 8

- name: Set up Node
uses: actions/setup-node@v3
if: ${{ steps.release.outputs.release_created }}
with:
node-version: 18
cache: "yarn"
registry-url: "https://registry.npmjs.org"
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: yarn --frozen-lockfile
if: ${{ steps.release.outputs.release_created }}
run: pnpm install

- name: Build
working-directory: idkit
if: ${{ steps.release.outputs.release_created }}
run: yarn build
run: pnpm build

- name: Publish
run: npm publish
if: ${{ steps.release.outputs.release_created }}
working-directory: idkit
run: pnpm publish -r --report-summary
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
6 changes: 4 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"idkit": "0.5.0",
".": "0.4.9"
"packages/core": "1.0.0-alpha.0",
"packages/react": "1.0.0-alpha.0",
"packages/standalone": "1.0.0-alpha.0",
".": "1.0.0-alpha.0"
}
39 changes: 21 additions & 18 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
{
"bootstrap-sha": "61ca0dedc321107141753dae699025d41b65ff90",
"release-type": "node",
"packages": {
".": {
"component": "root",
"extra-files": [
{
"type": "json",
"path": "example-react/package.json",
"jsonpath": "$.version"
},
{
"type": "json",
"path": "example-nextjs/package.json",
"jsonpath": "$.version"
}
],
"packages/core": {
"component": "core",
"skip-github-release": true
},
"packages/react": {
"component": "react",
"skip-github-release": true
},
"idkit": {
"package-name": "idkit",
"packages/standalone": {
"component": "standalone",
"skip-github-release": true
},
".": {
"component": "idkit",
"release-type": "node",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false
}
},
"plugins": [
{ "type": "node-workspace", "merge": false },
{
"type": "linked-versions",
"groupName": "group",
"components": ["core", "react", "standalone", "idkit"]
}
],
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit c9928de

Please sign in to comment.