File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2- name : Publish nuts to PyPI
2+ # https://www.ianwootten.co.uk/2020/10/23/publishing-to-pypi-using-github-actions/
3+ name : Publish nuts to PyPI and release on GitHub
34on : [push]
4- jobs :
5- build-and-publish :
5+ jobs :
6+ build-and-publish-to-pypi :
67 if : startsWith(github.ref, 'refs/tags')
78 name : Build and publish nuts to PyPI
89 runs-on : ubuntu-latest
910 steps :
10- - uses : actions/checkout@master
11+ - uses : actions/checkout@v2
1112 - name : Set up Python 3.7
12- uses : actions/setup-python@v1
13+ uses : actions/setup-python@v2
1314 with :
1415 python-version : 3.7
1516 - name : Install poetry
1819 run : poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"
1920 - name : Build and then publish nuts to PyPI
2021 run : poetry publish --build
22+ relase-on-github :
23+ if : startsWith(github.ref, 'refs/tags')
24+ name : Release on GitHub
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v2
28+ - name : Set tag value
29+ id : tag-val
30+ run : echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
31+ - name : Release on Github
32+ uses : softprops/action-gh-release@v1
33+ with :
34+ body_path : release_notes/${{ steps.tag-val.outputs.SOURCE_TAG }}.md
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+ GITHUB_REPOSITORY : bytinbit/nuts-test
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [[ $# != 1 ]] ; then
3+ echo " error: please provide a version tag in the form 'v.1.0.0'" >&2
4+ exit 1
5+ fi
6+
7+ FILE=release_notes/$1 .md
8+ if [[ ! -f " $FILE " ]]; then
9+ echo " $FILE does not exist, please create it first." >&2
10+ exit 1
11+ fi
12+
13+ git add release_notes/$1 .md
14+ git commit -am " add changelog for upcoming release $1 "
15+ git push
16+ git tag -a $1 -m " Version $1 "
17+ git push origin --tags
18+
Original file line number Diff line number Diff line change 1- # 3.0.0-alpha-1 (2021-04-27)
1+ # 3.0.0a1
22
33Defines current state of project as a very early alpha release, since major refactorings have not been merged yet.
You can’t perform that action at this time.
0 commit comments