Skip to content

chore(release): 2.1.0 (#4) #41

chore(release): 2.1.0 (#4)

chore(release): 2.1.0 (#4) #41

Workflow file for this run

name: Build & Publish to Pypi
on:
push:
branches: [ master ]
jobs:
# test:
# if: startsWith(github.event.head_commit.message, 'chore(release)')
# uses: "./.github/workflows/test.yml"
build:
# needs:
# - test
if: startsWith(github.event.head_commit.message, 'chore(release)')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish to PyPI
needs:
- build
if: startsWith(github.event.head_commit.message, 'chore(release)')
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/buttercms-python-testing-fork
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/