55 tags :
66 - " [0-9]+.[0-9]+.[0-9]+"
77
8+ env :
9+ GPG_KEY : " 7D76B375F08A7D93584B36D766538F03CDA385C7"
10+
811jobs :
912 release :
1013 runs-on : ubuntu-latest
@@ -18,10 +21,52 @@ jobs:
1821 run : |
1922 python -m pip install --upgrade pip
2023 pip install setuptools wheel twine
24+ - name : Prepare gpg
25+ run : |
26+ gpgconf --kill gpg-agent
27+ gpg --quiet --batch --yes --decrypt --passphrase="${{ secrets.GPG_PASSPHRASE }}" --output .github/sv-go-tools-bot.asc .github/sv-go-tools-bot.asc.gpg
28+ gpg --batch --yes --import .github/sv-go-tools-bot.asc
2129 - name : Build and publish
2230 env :
2331 TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
2432 TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
2533 run : |
2634 python setup.py sdist bdist_wheel
27- twine upload dist/*
35+ twine upload --sign --identity=${GPG_KEY} dist/*
36+ - name : Set Version
37+ id : version
38+ run : echo "::set-output name=version::$(echo ${{ github.ref }} | cut -d'/' -f3)"
39+ - name : sign
40+ id : sign
41+ run : |
42+ cd dist
43+ export GPG_TTY=$(tty)
44+ TARGET="marshmallow_objects-${{ steps.version.outputs.version }}-py3-none-any.whl"
45+ gpg --pinentry-mode loopback --batch --yes --default-key ${GPG_KEY} --output "${TARGET}.sig" --detach-sig "${TARGET}"
46+ echo "::set-output name=linux::${TARGET}.sig"
47+ - name : Create release
48+ id : create_release
49+ uses : actions/create-release@v1
50+ env :
51+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52+ with :
53+ tag_name : ${{ github.ref }}
54+ release_name : Release ${{ steps.version.outputs.version }}
55+ - name : Upload wheel
56+ 57+ env :
58+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59+ with :
60+ upload_url : ${{ steps.create_release.outputs.upload_url }}
61+ asset_path : dist/marshmallow_objects-${{ steps.version.outputs.version }}-py3-none-any.whl
62+ asset_name : marshmallow_objects-${{ steps.version.outputs.version }}-py3-none-any.whl
63+ asset_content_type : application/octet-stream
64+ - name : Upload signature
65+ 66+ env :
67+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68+ with :
69+ upload_url : ${{ steps.create_release.outputs.upload_url }}
70+ asset_path : dist/marshmallow_objects-${{ steps.version.outputs.version }}-py3-none-any.whl.sig
71+ asset_name : marshmallow_objects-${{ steps.version.outputs.version }}-py3-none-any.whl.sig
72+ asset_content_type : application/pgp-signature
0 commit comments