Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Commit 0417823

Browse files
committed
Add release drafter
1 parent 0d8a653 commit 0417823

7 files changed

+104
-0
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @tetienne

.github/pr-labeler.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
feature: ['feature/*', 'feat/*']
2+
enhancement: enhancement/*
3+
bug: fix/*
4+
breaking: breaking/*
5+
documentation: doc/*

.github/release-drafter.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name-template: 'v$NEXT_PATCH_VERSION'
2+
tag-template: 'v$NEXT_PATCH_VERSION'
3+
exclude-labels:
4+
- 'Meta: Exclude From Changelog'
5+
- 'auto-changelog'
6+
categories:
7+
- title: '⚠️ Breaking changes'
8+
label: 'breaking'
9+
- title: '🚀 Features'
10+
label: 'feature'
11+
- title: '✨ Enhancement'
12+
label: 'enhancement'
13+
- title: '📘 Documentation'
14+
label: 'documentation'
15+
- title: '🐛 Bug Fixes'
16+
label: 'bug'
17+
template: |
18+
## What's changed
19+
$CHANGES
20+
## Contributors to this release
21+
$CONTRIBUTORS

.github/workflows/pr-labeler.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: PR Labeler
2+
on:
3+
pull_request:
4+
types: [opened]
5+
6+
jobs:
7+
pr-labeler:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: TimonVS/pr-labeler-action@v3
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-labeler.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: PR Labeler
2+
on:
3+
pull_request:
4+
types: [opened]
5+
6+
jobs:
7+
pr-labeler:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: TimonVS/pr-labeler-action@v3
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-drafter.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
update_release_draft:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Update release draft
13+
uses: release-drafter/release-drafter@v5
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow will upload a Python Package using Poetry when a release is published
2+
3+
name: Publish Python Package (PyPi)
4+
5+
on:
6+
release:
7+
types: [ published ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
- name: Set up Poetry
20+
uses: Gr1N/setup-poetry@v4
21+
- name: Bump Poetry version
22+
run: |
23+
tag=${{ github.event.release.tag_name }}
24+
version_number=${tag#?}
25+
poetry version $version_number
26+
- name: Commit changes
27+
uses: EndBug/add-and-commit@v4
28+
with:
29+
message: "Bump version to ${{ github.event.release.tag_name }}"
30+
add: "pyproject.toml"
31+
ref: "main"
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Build and publish to PyPi
35+
env:
36+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
37+
run: |
38+
poetry publish --build

0 commit comments

Comments
 (0)