Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX: import deployment workflows #6

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/release-drafter.yml
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)._
33 changes: 33 additions & 0 deletions .github/workflows/cd.yml
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
33 changes: 33 additions & 0 deletions .github/workflows/pr-linting.yml
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]
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
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 }}
Loading