diff --git a/.autorc b/.autorc new file mode 100644 index 0000000..cf03c00 --- /dev/null +++ b/.autorc @@ -0,0 +1,117 @@ +{ + "onlyPublishWithReleaseLabel": true, + "noDefaultLabels": true, + "baseBranch": "main", + "author": "Neurobagel Bot ", + "noVersionPrefix": false, + "plugins": [ + "git-tag", + "released", + "first-time-contributor", + [ + "omit-commits", + { + "username": ["dependabot[bot]", "pre-commit-ci[bot]"], + "subject": "[pre-commit.ci]", + "labels": ["_bot", "skip-release"] + } + ] + ], + "labels": [ + { + "name": "pr-major-breaking", + "changelogTitle": "๐Ÿ’ฅ Breaking Changes", + "description": "Significant behaviour change that breaks compatibility, will increment major version (+1.0.0)", + "releaseType": "major", + "overwrite": true, + "color": "#C5000B" + }, + { + "name": "pr-minor-breaking", + "changelogTitle": "๐Ÿ’ฅ Breaking Changes", + "description": "Feature or enhancement that breaks compatibility, will increment minor version (0.+1.0)", + "releaseType": "minor", + "overwrite": true, + "color": "#F1A60E" + }, + { + "name": "pr-minor", + "changelogTitle": "๐Ÿš€ Enhancements", + "description": "Non-breaking feature or enhancement, will increment minor version (0.+1.0)", + "releaseType": "minor", + "overwrite": true, + "color": "#F1A60E" + }, + { + "name": "pr-patch", + "changelogTitle": "๐Ÿš€ Enhancements", + "description": "Incremental feature improvement, will increment patch version when merged (0.0.+1)", + "releaseType": "patch", + "overwrite": true, + "default": true, + "color": "#870048" + }, + { + "name": "pr-bug-fix", + "changelogTitle": "๐Ÿ› Bug Fixes", + "description": "Bug fix, will increment patch version when merged (0.0.+1)", + "releaseType": "patch", + "overwrite": true, + "color": "#870048" + }, + { + "name": "pr-internal", + "changelogTitle": "๐Ÿ  Internal", + "description": "Non-user-facing code improvement, will increment patch version when merged (0.0.+1)", + "releaseType": "patch", + "overwrite": true, + "color": "#696969" + }, + { + "name": "pr-performance", + "changelogTitle": "๐ŸŽ Performance Improvements", + "description": "Improve performance of an existing feature, will increment patch version when merged (0.0.+1)", + "releaseType": "patch", + "overwrite": true, + "color": "#f4b2d8" + }, + { + "name": "pr-documentation", + "changelogTitle": "๐Ÿ“ Documentation", + "description": "Change that only affects user documentation", + "releaseType": "none", + "overwrite": true, + "color": "#cfd3d7" + }, + { + "name": "pr-tests", + "changelogTitle": " ๐Ÿงช Tests", + "description": "Add or improve existing tests", + "releaseType": "none", + "overwrite": true, + "color": "#ffd3cc" + }, + { + "name": "pr-dependencies", + "changelogTitle": "๐Ÿ”ฉ Dependency Updates", + "description": "Update one or more dependencies version", + "releaseType": "none", + "overwrite": true, + "color": "#8732bc" + }, + { + "name": "skip-release", + "description": "PR doesn't appear in the changelog and preserves current version when merged", + "releaseType": "skip", + "overwrite": true, + "color": "#bf5416" + }, + { + "name": "release", + "description": "Create a release when this PR is merged", + "releaseType": "release", + "overwrite": true, + "color": "#007f70" + } + ] +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..f99181b --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,42 @@ + + + + + + +- Closes # + + +Changes proposed in this pull request: + +- +- + + +## Checklist +_This section is for the PR reviewer_ + +- [ ] PR has an interpretable title with a prefix (`[ENH]`, `[FIX]`, `[REF]`, `[TST]`, `[CI]`, `[MNT]`, `[INF]`, `[MODEL]`, `[DOC]`) _(see our [Contributing Guidelines](https://neurobagel.org/contributing/CONTRIBUTING#pull-request-guidelines) for more info)_ +- [ ] PR has a label for the release changelog or `skip-release` (to be applied by maintainers only) +- [ ] PR links to GitHub issue with mention `Closes #XXXX` +- [ ] Tests pass +- [ ] Checks pass + +For new features: +- [ ] Tests have been added + +For bug fixes: +- [ ] There is at least one test that would fail under the original bug conditions. diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..627d68b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,35 @@ +name: auto release + +on: + push: + branches: + - main + +jobs: + auto-release: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" + steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.NB_BOT_ID }} + private-key: ${{ secrets.NB_BOT_KEY }} + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ steps.generate-token.outputs.token }} + + - name: Download latest auto + run: | + auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" + wget -O- "$auto_download_url" | gunzip > ~/auto + chmod a+x ~/auto + + - name: Release + run: ~/auto shipit -vv + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }}