-
Notifications
You must be signed in to change notification settings - Fork 16
90 lines (75 loc) · 2.36 KB
/
foxpuppet_deploy.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Publish to PyPI
on:
pull_request:
# Sequence of patterns matched against refs/heads
branches:
- main
# on:
# release:
# types:
# - created
env:
PYTHON_VERSION: '3.12'
jobs:
test-and-publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.5
export PATH="$HOME/.local/bin:$PATH"
- name: Setup Firefox
id: setup-firefox
uses: ./.github/actions/setup_firefox/
with:
firefox-version: ${{ matrix.firefox }}
- run: |
echo Installed firefox versions: ${{ steps.setup-firefox.outputs.firefox-version }}
- name: Install Geckodriver
run: |
wget https://github.com/mozilla/geckodriver/releases/download/v0.35.0/geckodriver-v0.35.0-linux64.tar.gz
tar -xzf geckodriver-v0.35.0-linux64.tar.gz
sudo mv geckodriver /usr/bin/geckodriver
sudo chmod +x /usr/bin/geckodriver
geckodriver --version
- name: Build the Package
run: poetry build
- name: Install and Test the Wheel
run: |
python -m venv wheel-env
source wheel-env/bin/activate
pip install dist/*.whl
make test
deactivate
- name: Install and Test the Tarball
run: |
python -m venv tarball-env
source tarball-env/bin/activate
pip install dist/*.tar.gz
make test
deactivate
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
create-release:
name: Create GitHub Release
needs: test-and-publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${GITHUB_REF_NAME}" dist/*.whl dist/*.tar.gz \
--title "Release ${GITHUB_REF_NAME}" \
--notes "Automated release of version ${GITHUB_REF_NAME}"