-
-
Notifications
You must be signed in to change notification settings - Fork 17
67 lines (65 loc) · 1.94 KB
/
release.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
name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest]
python-version: ['3.10']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Git Tag
uses: olegtarasov/[email protected]
id: tagName
with:
tagRegex: 'v(.*)'
tagRegexGroup: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install poetry
poetry install
- name: Run Tests
run: poetry run python -m scripts.tests
- name: Run Build
run: poetry build
- name: Publish Package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: GitHub Release
uses: docker://antonyurchenko/git-release:v6
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_ACCESS_TOKEN }}
with:
args: dist/*
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
push: true
tags: >-
${{ secrets.DOCKER_HUB_USERNAME }}/kaskade:latest,
${{ secrets.DOCKER_HUB_USERNAME }}/kaskade:${{ steps.tagName.outputs.tag }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}