diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index e629bfa24da5..000000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,4 +0,0 @@ -python: - - py-polars/**/* -rust: - - polars/**/* diff --git a/.github/release-drafter-python.yml b/.github/release-drafter-python.yml new file mode 100644 index 000000000000..17dbcd1cc46d --- /dev/null +++ b/.github/release-drafter-python.yml @@ -0,0 +1,8 @@ +_extends: polars:.github/release-drafter.yml + +name-template: Python Polars $RESOLVED_VERSION +tag-template: py-$RESOLVED_VERSION +tag-prefix: py- + +include-labels: + - python diff --git a/.github/release-drafter-rust.yml b/.github/release-drafter-rust.yml new file mode 100644 index 000000000000..1ca73d2a3490 --- /dev/null +++ b/.github/release-drafter-rust.yml @@ -0,0 +1,8 @@ +_extends: polars:.github/release-drafter.yml + +name-template: Rust Polars $RESOLVED_VERSION +tag-template: rs-$RESOLVED_VERSION +tag-prefix: rs- + +include-labels: + - rust diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 000000000000..6afaf4208903 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,83 @@ +categories: + - title: 🏆 Highlights + labels: highlight + - title: ⚠️ Breaking changes + labels: breaking + - title: 🚀 Performance improvements + labels: performance + - title: ✨ Enhancements + labels: enhancement + - title: 🐞 Bug fixes + labels: fix + - title: 🛠️ Other improvements + labels: + - build + - chore + - ci + - docs + - refactor + - revert + - style + - test + +change-template: '- $TITLE (#$NUMBER)' +change-title-escapes: '\<*_&' +replacers: + # Remove conventional commits from titles + - search: '/- (build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(.*\))?(\!)?\: /g' + replace: '- ' + +version-resolver: + minor: + labels: breaking + default: patch + +autolabeler: + - label: rust + title: + - '/^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)\(.*rust.*\)/' + - label: python + title: + - '/^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)\(.*python.*\)/' + - label: breaking + title: + - '/^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(.*\))?\!\: /' + - label: build + title: + - '/^build/' + - label: chore + title: + - '/^chore/' + - label: ci + title: + - '/^ci/' + - label: docs + title: + - '/^docs/' + - label: enhancement + title: + - '/^feat/' + - label: fix + title: + - '/^fix/' + - label: performance + title: + - '/^perf/' + - label: refactor + title: + - '/^refactor/' + - label: revert + title: + - '/^revert/' + - label: style + title: + - '/^style/' + - label: test + title: + - '/^test/' + +template: | + $CHANGES + + Thank you to all our contributors for making this release possible! + $CONTRIBUTORS diff --git a/.github/workflows/create-py-mac-universal2-release.yaml b/.github/workflows/create-py-mac-universal2-release.yaml index 526a1cc6c8f5..2489c17ccefc 100644 --- a/.github/workflows/create-py-mac-universal2-release.yaml +++ b/.github/workflows/create-py-mac-universal2-release.yaml @@ -3,7 +3,7 @@ name: Create macOs universal2/aarch64-apple-darwin python release on: push: tags: - - 'py-polars-v*' + - py-* defaults: run: diff --git a/.github/workflows/create-py-release-manylinux-lts-cpu.yaml b/.github/workflows/create-py-release-manylinux-lts-cpu.yaml index 41afc7fe0e51..1bdf8ac49193 100644 --- a/.github/workflows/create-py-release-manylinux-lts-cpu.yaml +++ b/.github/workflows/create-py-release-manylinux-lts-cpu.yaml @@ -3,7 +3,7 @@ name: Create Python release manylinux LTS-CPU on: push: tags: - - 'py-polars-v*' + - py-* defaults: run: diff --git a/.github/workflows/create-py-release-manylinux.yaml b/.github/workflows/create-py-release-manylinux.yaml index 3fdd70d7a44c..632d91082551 100644 --- a/.github/workflows/create-py-release-manylinux.yaml +++ b/.github/workflows/create-py-release-manylinux.yaml @@ -3,7 +3,7 @@ name: Create Python release manylinux on: push: tags: - - 'py-polars-v*' + - py-* defaults: run: diff --git a/.github/workflows/create-py-release-windows-macos.yaml b/.github/workflows/create-py-release-windows-macos.yaml index 871b4b2b4d4d..036f4ca5fb63 100644 --- a/.github/workflows/create-py-release-windows-macos.yaml +++ b/.github/workflows/create-py-release-windows-macos.yaml @@ -3,7 +3,7 @@ name: Create Python release windows macos on: push: tags: - - 'py-polars-v*' + - py-* defaults: run: diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml deleted file mode 100644 index 778b4b9c68f9..000000000000 --- a/.github/workflows/labeler.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: Pull request labeler - -on: pull_request_target - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Label pull request - uses: actions/labeler@v4 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 000000000000..13b82c26e61e --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,20 @@ +name: Pull request labeler + +on: + pull_request_target: + types: [opened, edited] + +permissions: + contents: read + pull-requests: write + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Label pull request + uses: release-drafter/release-drafter@v5 + with: + disable-releaser: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 000000000000..2bbef2a71d3a --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,31 @@ +name: Update draft releases + +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: write + pull-requests: read + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Draft Rust release + uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter-rust.yml + disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Draft Python release + uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter-python.yml + disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index cdb855f64bb0..012ab7ed7ab0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,2 @@ - -changelog-python: - docker run -it --env-file .env --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u pola-rs -p polars --exclude-labels rust - -changelog-rust: - docker run -it --env-file .env --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u pola-rs -p polars --exclude-labels python - fmt_toml: dprint fmt