-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DX: import deployment workflows (#6)
* DX: add release drafter * DX: add PR linting * DX: add CD workflow for pushing to version branches
- Loading branch information
Showing
4 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name-template: update-pip-constraints $NEXT_PATCH_VERSION | ||
tag-template: $NEXT_PATCH_VERSION | ||
|
||
references: | ||
- main | ||
- epic/* | ||
|
||
categories: | ||
- title: ✨ New features | ||
label: ✨ Feature | ||
- title: ⚠️ Enhancements and optimizations | ||
label: ⚙️ Enhancement | ||
- title: ⚠️ API changes | ||
label: ⚠️ Interface | ||
- title: ⚠️ Changes that may affect behavior | ||
label: ❗ Behavior | ||
- title: 🐛 Bug fixes | ||
label: 🐛 Bug | ||
- title: 📝 Documentation | ||
label: 📝 Docs | ||
- title: 🔨 Maintenance | ||
label: 🔨 Maintenance | ||
- title: 🖱️ Developer Experience | ||
label: 🖱️ DX | ||
|
||
change-template: "- $TITLE (#$NUMBER)" | ||
|
||
replacers: | ||
- search: /([A-Z]+!?:\s*)(.*)/g | ||
replace: $2 | ||
|
||
sort-direction: ascending | ||
|
||
template: | | ||
$CHANGES | ||
_The full changelog as commits can be found [here](https://github.com/ComPWA/update-pip-constraints/compare/$PREVIOUS_TAG...$NEXT_PATCH_VERSION)._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CD | ||
|
||
on: | ||
release: | ||
types: | ||
- prereleased | ||
- released | ||
|
||
jobs: | ||
milestone: | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: ComPWA/actions/.github/workflows/close-milestone.yml@v1 | ||
push-to-version-branches: | ||
name: Push to version branches | ||
if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git credentials | ||
run: | | ||
git config --global user.name "GitHub Action" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: Push to matching minor version branch | ||
env: | ||
TAG: ${{ github.ref_name }} | ||
run: | | ||
re='^(v?)([0-9]+)\.([0-9]+)\.[0-9]+' | ||
if [[ $TAG =~ $re ]]; then | ||
MAJOR_VERSION="${BASH_REMATCH[2]}" | ||
MINOR_VERSION="${BASH_REMATCH[2]}.${BASH_REMATCH[3]}" | ||
git push origin HEAD:refs/heads/v$MAJOR_VERSION --force | ||
git push origin HEAD:refs/heads/v$MINOR_VERSION --force | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: PR linting | ||
on: | ||
pull_request: | ||
types: | ||
- edited | ||
- labeled | ||
- opened | ||
- reopened | ||
- synchronize | ||
- unlabeled | ||
|
||
jobs: | ||
check-labels: | ||
name: Check labels | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
any_of: >- | ||
🐛 Bug,✨ Feature,⚙️ Enhancement,⚠️ Interface,❗ Behavior,📝 Docs,🔨 Maintenance,🖱️ DX | ||
none_of: Epic,💫 Good first issue | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
check-title: | ||
name: Check title | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: npm install @compwa/commitlint-config | ||
- name: Create commitlint config | ||
run: | | ||
echo "module.exports = {extends: ['@compwa/commitlint-config']}" > commitlint.config.js | ||
- uses: JulienKode/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- epic/* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |