-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (56 loc) · 1.51 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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:
fetch-depth: 0 # For getting tags from the repo
- 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: Run tox in our virtualenv
run: |
. ./env/bin/activate
tox
#
# Wheel created, publish it!
#
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1