Skip to content

Merge pull request #1049 from SFDO-Tooling/release-3.6.3 #48

Merge pull request #1049 from SFDO-Tooling/release-3.6.3

Merge pull request #1049 from SFDO-Tooling/release-3.6.3 #48

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@4
- name: Set up Python 3.8
uses: actions/setup-python@v5
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