Skip to content

Merge pull request #1026 from SFDO-Tooling/w13-dependency-updates #46

Merge pull request #1026 from SFDO-Tooling/w13-dependency-updates

Merge pull request #1026 from SFDO-Tooling/w13-dependency-updates #46

Workflow file for this run

# 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: sfdc-ubuntu-latest
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