diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 000000000..706a87cdb --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,17 @@ +name: Sync main and next-moc +on: + push: + branches: + - main +jobs: + sync-branch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Merge main -> next-moc + uses: devmasx/merge-branch@v1.3.1 + with: + type: now + from_branch: main + target_branch: next-moc + github_token: ${{ github.token }} diff --git a/Release.md b/Release.md new file mode 100644 index 000000000..1b5968182 --- /dev/null +++ b/Release.md @@ -0,0 +1,23 @@ +# Release process + +Please refer to the [release instructions](https://github.com/dfinity/motoko/blob/master/Building.md#making-releases) in the Motoko repository. + +## The `next-moc` branch + +The `next-moc` branch contains changes that make base compatible with the +in-development version of `moc`. This repository's public CI does _not_ run +on that branch. + +External contributions are best made against `main`. + +- `main` branch is meant for the newest **released** version of `moc` + - The CI runs on this branch +- `next-moc` branch is meant for the **in-development** version of `moc` + - This branch is used by the [`motoko` repository](https://github.com/dfinity/motoko)'s CI + +Both branches are kept in sync with each other by mutual, circular merges: +- `next-moc` is updated automatically on each push to `main` via the [sync.yml](.github/workflows/sync.yml) workflow +- `main` is updated **manually** on each release of `moc` as part of the `motoko` release process + +Only *normal* merges are allowed between `main` and `next-moc`, because development is permitted on both branches. +This policy makes every PR (to either branch) visible in the history of both branches. \ No newline at end of file