Skip to content

Commit 6019d52

Browse files
committed
Prepare v0.0.7 release
1 parent 33b7771 commit 6019d52

File tree

3 files changed

+44
-10
lines changed

3 files changed

+44
-10
lines changed

.github/workflows/release.yaml

+42-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,60 @@
1-
name: Publish
1+
name: Release
22
on:
3-
release:
4-
types:
5-
- created
3+
push:
4+
branches:
5+
- workflow_release
6+
tags:
7+
- 'v[0-9]+.[0-9]+.[0-9]+'
68
jobs:
7-
publish:
8-
name: publish
9+
release:
10+
name: release
911
runs-on: ubuntu-latest
1012
steps:
11-
- uses: actions/checkout@v2
13+
- name: Get the branch and tag
14+
id: info
15+
run: |
16+
branch="${GITHUB_REF#refs/heads/}"
17+
echo "$branch"
18+
if [[ "$branch" == "workflow_release" ]]; then
19+
echo "::set-output name=version::TEST-0.0.0"
20+
echo "::set-output name=draft::true"
21+
else
22+
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
23+
echo "::set-output name=draft::false"
24+
fi
25+
echo "::set-output name=date::$(env TZ=':America/Los_Angeles' date +'%Y-%m-%d')"
26+
1227
- name: Set up Python
1328
uses: actions/setup-python@v1
1429
with:
1530
python-version: '3.7'
31+
32+
- name: Checkout repository
33+
uses: actions/checkout@v2
34+
1635
- name: Install dependencies
1736
run: |
1837
python -m pip install --upgrade pip
1938
pip install poetry
39+
2040
- name: Build
2141
run: |
2242
poetry build
23-
- name: Publish
43+
44+
- name: Create GitHub release
45+
uses: softprops/action-gh-release@v1
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
draft: ${{ steps.info.outputs.draft }}
50+
files: |
51+
dist/xml_dataclasses-*-py3-none-any.whl
52+
dist/xml_dataclasses-*.tar.gz
53+
name: ${{ steps.info.outputs.version }} (${{ steps.info.outputs.date }})
54+
tag_name: ${{ steps.info.outputs.version }}
55+
56+
- name: Publish to PyPI
57+
if: ${{ steps.info.outputs.draft == false }}
2458
run: |
2559
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
2660
poetry publish

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ This makes sense in many cases, but possibly not every case.
216216

217217
## Changelog
218218

219-
### [0.0.7] - unreleased
219+
### [0.0.7] - 2021-04-08
220220

221221
* Warn if comments are found/don't treat comments as child elements in error messages
222222
* Allow lenient loading of undeclared attributes or children

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "xml_dataclasses"
3-
version = "0.0.6"
3+
version = "0.0.7"
44
description = "(De)serialize XML documents into specially-annotated dataclasses"
55
authors = ["Toby Fleming <[email protected]>"]
66
license = "MPL-2.0"

0 commit comments

Comments
 (0)