diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb2b91e50f..8b1eaa4914 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI pipeline +name: 'CI workflow' on: pull_request: diff --git a/.github/workflows/release-prepare.yml b/.github/workflows/release-prepare.yml new file mode 100644 index 0000000000..98bff3fbb6 --- /dev/null +++ b/.github/workflows/release-prepare.yml @@ -0,0 +1,23 @@ +name: Prepare release PR workflow + +on: + push: + branches: + - main + +jobs: + create-release-pr: + name: Create Changeset PR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install Dependencies + run: yarn --frozen-lockfile + - name: Create Release Pull Request + uses: changesets/action@v1 + with: + # Calls out to `changeset version`, but also runs prettier + version: yarn release + title: 'Release new version(s)' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cd.yml b/.github/workflows/release-publish.yml similarity index 99% rename from .github/workflows/cd.yml rename to .github/workflows/release-publish.yml index e3f0b7ab5e..f4fc24f820 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/release-publish.yml @@ -1,4 +1,4 @@ -name: 'CD pipeline' +name: 'Release and publish Workflow' on: workflow_dispatch: diff --git a/README.md b/README.md index a756d4d9f5..dd0cf879f3 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,34 @@ Name | Description ---------|---------- [score-card](https://github.com/Oriflame/backstage-plugins/blob/main/plugins/score-card/README.md) | Main idea behind it comes from a need to somehow visualize maturity of our services and to establish a process how to improve it (discuss with the teams what to focus on next). +## Workflows + +We use GitHub actions to check build, unit & end to end test and other validations during pull requests. We use them also to prepare releases and publish npm packages. + +In overview: + +- create branch, commit changes, run `yarn changeset`, commit and create PR -> [CI workflow](#ci-workflow) will run +- once merged to `main` (on push) [Prepare release PR workflow](#prepare-release-pr-workflow) -> `Release new version(s)` pull request is created automatically. It shall increase versions of packages and update changelogs in respective plugins and cleanup the `.changeset` folder. +- once this PR is merged to `main` [Release and publish Workflow](#release-and-publish-workflow) will create a new release on GitHub and also publishes changed plugins. + +### CI workflow + +Source: `.github/workflows/ci.yml` + +Shall be executed during `pull requests` to validate changes and also during push to `main` branch to keep validating the main trunk. + +## Prepare release PR workflow + +Source: `.github/workflows/release-prepare.yml` + +Shall be executed on push to `main`. It runs `yarn release` = increase versions of packages and update changelogs in respective plugins and cleanup the `.changeset` folder. It comit the changes in a new branch and prepare a new PR `Release new version(s)`. + +### Release and publish Workflow + +Source: `.github/workflows/ci.yml` + +Shall be executed on push to `main`. In case the package versions are changed (which are by the previous PR) it creates a new release on GitHub and also publishes changed plugins to npm repository. + ## Thank you note When creating this repository (pipelines, e2e tests, monorepo setup...) we were inspired a lot by a following repository [roadie-backstage-plugins](https://github.com/RoadieHQ/roadie-backstage-plugins). diff --git a/renovate.json b/renovate.json index be4e051c40..1977272c1d 100644 --- a/renovate.json +++ b/renovate.json @@ -14,7 +14,6 @@ ], "stabilityDays": 3, "internalChecksFilter": "strict", - "bumpVersion": "patch", "packageRules": [ { "paths": [