Skip to content

feat(img): custom image build cache (#5) #4

feat(img): custom image build cache (#5)

feat(img): custom image build cache (#5) #4

Workflow file for this run

name: publish to Pypi
on:
push:
tags:
- v*
jobs:
publish:
name: build and publish to PyPi
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a
with:
version: 2.1.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set build hash
run: |
HASH=${{ github.sha }}
sed -i -e 's|^__build_hash__ = "unknown"|__build_hash__ = "'$HASH'"|' sandock/_version.py
cat sandock/_version.py
- name: Build a binary wheel and a source tarball
run: |
poetry build
- name: Publish dist package
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
with:
packages_dir: dist/