Skip to content

Commit

Permalink
ci: add release please
Browse files Browse the repository at this point in the history
  • Loading branch information
eoaksnes committed Jun 28, 2023
1 parent fbb436c commit 2c323e5
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 9 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Create release-please PR"

on:
workflow_dispatch:
workflow_call:
outputs:
release_created:
description: "If true, a release PR has been merged"
value: ${{ jobs.release-please.outputs.release_created }}
tag_name:
description: "The release tag. Ex v1.4.0"
value: ${{ jobs.release-please.outputs.tag_name }}

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
changelog-types: >
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "feature", "section": "Features", "hidden": false},
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
{ "type": "revert", "section": "Reverts", "hidden": false },
{ "type": "docs", "section": "Documentation", "hidden": false },
{ "type": "style", "section": "Styles", "hidden": false },
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
{ "type": "refactor", "section": "Code Refactoring", "hidden": false },
{ "type": "test", "section": "Tests", "hidden": false },
{ "type": "build", "section": "Build System", "hidden": false },
{ "type": "ci", "section": "Continuous Integration", "hidden": false }
]
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
24 changes: 15 additions & 9 deletions .github/workflows/on-main-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- release

jobs:
tests:
Expand All @@ -11,17 +12,22 @@ jobs:
integration-tests:
uses: ./.github/workflows/integration-tests.yaml

publish-integration-tests-report:
needs: integration-tests
if: ${{ ! cancelled() }}
uses: ./.github/workflows/publish-integration-tests-report.yaml
with:
dmss_version: ${{ needs.integration-tests.outputs.dmss_version }}
dm_cli_version: ${{ needs.integration-tests.outputs.dm_cli_version }}
job_version: ${{ needs.integration-tests.outputs.job_version }}
#publish-integration-tests-report:
# needs: integration-tests
# if: ${{ ! cancelled() }}
# uses: ./.github/workflows/publish-integration-tests-report.yaml
# with:
# dmss_version: ${{ needs.integration-tests.outputs.dmss_version }}
# dm_cli_version: ${{ needs.integration-tests.outputs.dm_cli_version }}
# job_version: ${{ needs.integration-tests.outputs.job_version }}

release-please:
needs: tests
uses: ./.github/workflows/create-release-pr.yaml

publish-packages:
needs: [tests]
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
16 changes: 16 additions & 0 deletions .release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"release-type": "node",
"monorepo-tags": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"prerelease": true,
"separate-pull-requests": true,
"packages": {
"./packages/dm-core": {
"package-name": "@development-framework/dm-core"
},
"./packages/dm-core-plugins": {
"package-name": "@development-framework/dm-core-plugins"
}
}
}

0 comments on commit 2c323e5

Please sign in to comment.