Skip to content

Betty 0.3.1

Betty 0.3.1 #25

name: Build setuptools artifacts (Release)
on:
release:
types:
- published
jobs:
setuptools:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: 'Python 3.12'
os: ubuntu-latest
python: '3.12'
steps:
- name: Check out the source code
uses: actions/checkout@v4
- name: Get the pip cache directory
run: echo "pip_cache_dir=$(pip cache dir)" >> $GITHUB_ENV
shell: bash
- name: Cache pip
uses: actions/cache@v4
with:
path: ${{ env.pip_cache_dir }}
key: pip-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('./setup.py') }}
restore-keys: |
pip-${{ runner.os }}-${{ matrix.python }}-
- name: Get the npm cache directory
run: echo "npm_cache_dir=$(npm config get cache)" >> $GITHUB_ENV
shell: bash
- name: Cache npm
uses: actions/cache@v4
with:
path: ${{ env.npm_cache_dir }}
key: npm-${{ runner.os }}-${{ hashFiles('./package.json') }}
restore-keys: |
npm-${{ runner.os }}-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build the distributions
run: ./bin/build-setuptools '${{ github.event.release.tag_name }}'
shell: bash
- name: Publish the distributions to PyPI
run: twine upload -u __token__ ./dist/*
shell: bash
env:
TWINE_NON_INTERACTIVE: true
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}