Skip to content

Commit c551eb6

Browse files
authored
Automated release documentation and pypi distribution (#63)
* Set up release automation Added release-drafter github action which implements the standard wiremock release template along with a new release action which will automate to pypi automated releases will now happen when a release is published from github. We are opting to use trusted-publisher feature from pypi rather than requiring PYPI_TOKEN to be used. This updated workflow uses pypa/gh-action-pypi-publish@release/v1 marketplace action to handle the publish to pypi
1 parent 2fa4c1a commit c551eb6

File tree

4 files changed

+111
-1
lines changed

4 files changed

+111
-1
lines changed

.github/release-drafter.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
2+
name-template: $NEXT_MINOR_VERSION
3+
tag-template: $NEXT_MINOR_VERSION
4+
5+
# Emoji reference: https://gitmoji.carloscuesta.me/
6+
categories:
7+
- title: 💥 Breaking changes
8+
labels:
9+
- breaking
10+
- title: 🚀 New features and improvements
11+
labels:
12+
- enhancement
13+
- title: 🐛 Bug fixes
14+
labels:
15+
- bug
16+
- title: 📝 Documentation updates
17+
labels:
18+
- documentation
19+
- title: 🌐 Localization and translation
20+
labels:
21+
- localization
22+
- title: 🌐 Community-related changes
23+
labels:
24+
- community
25+
- title: 👻 Maintenance
26+
labels:
27+
- chore
28+
- maintenance
29+
- title: 🚦 Tests
30+
labels:
31+
- test
32+
- title: ✍ Other changes
33+
# Default label used by Dependabot
34+
- title: 📦 Dependency updates
35+
labels:
36+
- dependencies
37+
collapse-after: 15
38+
exclude-labels:
39+
- skip-changelog
40+
- invalid
41+
42+
template: |
43+
<!-- Optional: add a release summary here -->
44+
$CHANGES
45+
46+
autolabeler:
47+
- label: "documentation"
48+
files:
49+
- "*.md"
50+
branch:
51+
- '/docs{0,1}\/.+/'
52+
- label: "bug"
53+
branch:
54+
- '/fix\/.+/'
55+
title:
56+
- "/fix/i"
57+
- label: "enhancement"
58+
branch:
59+
- '/feature\/.+/'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update_release_draft:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: release-drafter/release-drafter@v5
13+
with:
14+
name: next
15+
tag: next
16+
version: next
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: 3.10
16+
- name: Install Poetry
17+
run: curl -sSL https://install.python-poetry.org | python
18+
- name: Install dependencies
19+
run: poetry install
20+
- name: Build distributions
21+
run: poetry build
22+
23+
pypi-publish:
24+
name: Upload release to PyPI
25+
runs-on: ubuntu-latest
26+
environment:
27+
name: pypi
28+
url: https://pypi.org/p/wiremock
29+
permissions:
30+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
31+
steps:
32+
- name: Publish package distributions to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "wiremock"
3-
version = "2.3.2"
3+
version = "2.4.0-alpha"
44
description = "Wiremock Admin API Client"
55
authors = ["Cody Lee <cody.lee@datadoghq.com>", "Mike Waites <mikey.waites@gmail.com>"]
66
license = "OSI Approved :: Apache Software License"

0 commit comments

Comments
 (0)