-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (56 loc) · 1.92 KB
/
release.yml
File metadata and controls
67 lines (56 loc) · 1.92 KB
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
name: 🚚 Release
on:
push:
branches:
- 'main'
jobs:
release:
if: ${{ !contains(github.event.head_commit.message, '[skip release]') }}
runs-on: ubuntu-latest
concurrency: release
permissions:
checks: read
statuses: read
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to be able to authenticate with PyPI using OIDC
steps:
- name: ⏰ Wait for builds to succeed
uses: lewagon/wait-on-check-action@v1.4.0
with:
ref: ${{ github.ref }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
running-workflow-name: wait-for-check-regexp
check-regexp: build-.*
- name: 🛒 Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SEMANTIC_PAT_TOKEN }}
- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: 👷🏻 Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt
- name: 👾 Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: ${{ vars.DOCKER_BUILD_PLATFORMS }}
- name: 🪪 Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🚀 Publish release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_PAT_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: python -m semantic_release publish --verbosity=DEBUG