Create release #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create release | |
on: | |
workflow_dispatch | |
jobs: | |
build-package: | |
name: Build package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Install tools | |
run: | | |
sudo apt-get install python3 python3-pip | |
pip3 install wheel | |
python3 -m pip install --upgrade twine | |
- name: Build package | |
run: python3 setup.py sdist bdist_wheel | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist/ | |
- name: Create github release | |
uses: "softprops/action-gh-release@v1" | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
generate_release_notes: true | |
prerelease: false | |
files: dist/MacToManufacturer-* | |
- name: Release on pypi | |
run: | | |
python3 -m twine upload --username __token__ --password ${{ secrets.PYPI_SECRET }} --repository pypi dist/* |