From 99813fe08bb71521189ab9f4fe377baa6e17341f Mon Sep 17 00:00:00 2001 From: Remco de Boer Date: Tue, 15 Jun 2021 20:59:29 +0200 Subject: [PATCH 1/3] ci: add release drafter --- .github/release-drafter.yml | 41 +++++++++++++++++++++++++++ .github/workflows/release-drafter.yml | 16 +++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..cf2530f5 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,41 @@ +name-template: ComPWA Organization Documentation $NEXT_PATCH_VERSION +tag-template: $NEXT_PATCH_VERSION + +references: + - main + - epic/* + +categories: + - title: 💡 New features + label: 💡 Feature + - title: ⚠️ Interface + label: ⚠️ Interface + - title: 🐛 Bug fixes + label: Bug + - title: 🔨 Internal maintenance + label: 🔨 Maintenance + - title: 📝 Documentation + label: 📝 Docs + - title: 🖱️ Developer Experience + label: 🖱️ DX + +change-template: | +
+ $TITLE (#$NUMBER) + + $BODY + +
+ +replacers: + - search: /([a-z]+!?:\s*)(.*)/g + replace: $2 + +sort-direction: ascending + +template: | + # Release $NEXT_PATCH_VERSION + + See all documentation for this version [here](https://compwa-org.rtfd.io/en/$NEXT_PATCH_VERSION). + + $CHANGES diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000..d54187de --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,16 @@ +name: Release Drafter + +on: + push: + branches: + - main + - epic/* + workflow_dispatch: + +jobs: + update_release_draft: + runs-on: ubuntu-20.04 + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bab2ef6c1ded1f8c0190596a2715cf5fb4c8ecbb Mon Sep 17 00:00:00 2001 From: Remco de Boer Date: Tue, 15 Jun 2021 21:00:18 +0200 Subject: [PATCH 2/3] ci: add Continuous Deployment workflow --- .github/workflows/cd.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..61586ffd --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,22 @@ +# cspell:ignore noreply prereleased + +name: CD + +on: + release: + types: + - prereleased + - released + +jobs: + push: + name: Push to stable branch + if: startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@master + - name: Push to stable branch + run: | + git config --global user.name "GitHub Action" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git push origin HEAD:refs/heads/stable -f From 1e0d1f6c3bff8d60f75bb6774ba0c1954ce16d2e Mon Sep 17 00:00:00 2001 From: Remco de Boer Date: Tue, 15 Jun 2021 21:24:46 +0200 Subject: [PATCH 3/3] fix: link demos to stable branch --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 47589d41..ed188877 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -193,7 +193,7 @@ break if not notebook_title: raise ValueError(f'Notebook "{filepath}" does not have a title') - link = f"https://mybinder.org/v2/gh/ComPWA/compwa-org/main?urlpath=apps%2Fdemo%2F{filename}" + link = f"https://mybinder.org/v2/gh/ComPWA/compwa-org/stable?urlpath=apps%2Fdemo%2F{filename}" demo_template += f"{notebook_title} <{link}>\n" demo_template += "```\n"