Skip to content

Commit

Permalink
Prepare v0.0.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
tobywf committed Apr 9, 2021
1 parent 33b7771 commit 6019d52
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
50 changes: 42 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,60 @@
name: Publish
name: Release
on:
release:
types:
- created
push:
branches:
- workflow_release
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
name: publish
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get the branch and tag
id: info
run: |
branch="${GITHUB_REF#refs/heads/}"
echo "$branch"
if [[ "$branch" == "workflow_release" ]]; then
echo "::set-output name=version::TEST-0.0.0"
echo "::set-output name=draft::true"
else
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
echo "::set-output name=draft::false"
fi
echo "::set-output name=date::$(env TZ=':America/Los_Angeles' date +'%Y-%m-%d')"
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'

- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build
run: |
poetry build
- name: Publish
- name: Create GitHub release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: ${{ steps.info.outputs.draft }}
files: |
dist/xml_dataclasses-*-py3-none-any.whl
dist/xml_dataclasses-*.tar.gz
name: ${{ steps.info.outputs.version }} (${{ steps.info.outputs.date }})
tag_name: ${{ steps.info.outputs.version }}

- name: Publish to PyPI
if: ${{ steps.info.outputs.draft == false }}
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
poetry publish
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ This makes sense in many cases, but possibly not every case.

## Changelog

### [0.0.7] - unreleased
### [0.0.7] - 2021-04-08

* Warn if comments are found/don't treat comments as child elements in error messages
* Allow lenient loading of undeclared attributes or children
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xml_dataclasses"
version = "0.0.6"
version = "0.0.7"
description = "(De)serialize XML documents into specially-annotated dataclasses"
authors = ["Toby Fleming <[email protected]>"]
license = "MPL-2.0"
Expand Down

0 comments on commit 6019d52

Please sign in to comment.