diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml new file mode 100644 index 000000000..433a9aec2 --- /dev/null +++ b/.github/workflows/create-release-pr.yaml @@ -0,0 +1,38 @@ +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: + 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 }} diff --git a/.github/workflows/on-main-push.yaml b/.github/workflows/on-main-push.yaml index 7a960a6d7..92b4847bc 100644 --- a/.github/workflows/on-main-push.yaml +++ b/.github/workflows/on-main-push.yaml @@ -3,6 +3,7 @@ on: push: branches: - main + - release jobs: tests: @@ -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: diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..7b151ba76 --- /dev/null +++ b/release-please-config.json @@ -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" + } + } +}