Skip to content

Try forcing tag retrieval #6

Try forcing tag retrieval

Try forcing tag retrieval #6

Workflow file for this run

name: Continuous Delivery
env:
# NOTE: This version must match between all .yml files in the
# .github/workflows directory
TOX_VERSION: 4.0.9
on:
push:
tags:
- "*"
jobs:
homebrew:
runs-on: ubuntu-latest
steps:
- name: Bump Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@v3
with:
token: ${{secrets.JOHAN_GITHUB_API_TOKEN}}
formula: px
pypi:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pxpx
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
#
# First, we need to create a wheel. We do this by running tox, just like
# in linux-ci.yml.
#
- name: Check out repository code
uses: actions/checkout@v4
with:
# For getting tags from the repo
fetch-depth: 0
fetch-tags: true
- name: Print current revision
run: |
git describe --dirty
- name: Cache .tox directory
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-${{ hashFiles('tox.ini') }}
- name: Create a virtualenv
run: |
python3 -m venv env
- name: Install tox in our virtualenv
run: |
. ./env/bin/activate
pip install tox==${{ env.TOX_VERSION }}
- name: Prevent 0.0.0 releases
run: |
. ./env/bin/activate
tox -e version.py
cat px/version.py
! grep '0.0.0' px/version.py
- name: Run tox in our virtualenv
run: |
. ./env/bin/activate
tox
- name: Print debug info
run: |
ls dist/
! ls dist/ | grep '0.0.0'
#
# Wheel created, publish it!
#
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1