-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (52 loc) · 1.29 KB
/
build-and-publish.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
name: Build and Release
on:
push:
branches:
- main
tags:
- "*"
jobs:
build:
name: Build
runs-on: "ubuntu-latest"
strategy:
fail-fast: true
matrix:
arch: ["amd64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.22.1"
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install Python tools
run: |
python -m pip install --upgrade pip setuptools build wheel
- name: Build
run: |
python -m build --sdist
python ./.github/build-manylinux.py --arch $arch
env:
arch: ${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: certbot-dns-multi
path: dist/
publish:
name: Publish to PyPI
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: certbot-dns-multi
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}