Merge pull request #955 from SFDO-Tooling/feature/snowfakery-3.6.0 #44
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
# based on CumulusCI's release.yml | |
name: Release snowfakery | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- snowfakery/version.txt | |
workflow_dispatch: | |
jobs: | |
publish-to-pypi: | |
name: Publish new release to PyPI | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install build tools | |
run: python -m pip install twine wheel | |
- name: Build source tarball and binary wheel | |
run: python setup.py sdist bdist_wheel | |
- name: Upload to PyPI | |
run: twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
- name: Create tag | |
run: | | |
curl -s -X POST https://api.github.com/repos/$GITHUB_REPOSITORY/git/refs -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d @- << EOF | |
{"ref": "refs/tags/v$(python setup.py --version)", "sha": "$GITHUB_SHA"} | |
EOF |