Skip to content

Commit f991121

Browse files
authored
Merge pull request #20 from peopledoc/release_workflow
Adding a release workflow for release 1.1.0
2 parents 999be9b + 1dca379 commit f991121

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

.github/release-drafter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
template: |
2+
$CHANGES
3+
4+
## Kudos:
5+
6+
$CONTRIBUTORS

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
release:
8+
types:
9+
- published
10+
11+
jobs:
12+
deploy:
13+
name: Publish package to PyPI
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Python
19+
id: setup-python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python_version }}
23+
24+
- name: Install
25+
run: pip install build
26+
27+
- name: Wait for tests to succeed
28+
uses: fountainhead/action-wait-for-check@v1.0.0
29+
id: wait-for-ci
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
checkName: success
33+
34+
- name: Build package
35+
run: python -m build
36+
37+
- name: Exit if CI did not succeed
38+
if: steps.wait-for-ci.outputs.conclusion != 'success'
39+
run: exit 1
40+
41+
- name: Publish a Python distribution to PyPI
42+
uses: pypa/gh-action-pypi-publish@release/v1
43+
with:
44+
user: __token__
45+
password: "${{ secrets.PYPI_TOKEN }}"

.github/workflows/release-drafter.yml

Lines changed: 15 additions & 0 deletions
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+
# Drafts the next Release notes as Pull Requests are merged into "master"
13+
- uses: release-drafter/release-drafter@v5
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
3+
4+
[tool.setuptools_scm]

0 commit comments

Comments
 (0)