-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 1.86 KB
/
atils-on-merge.yaml
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
name: Atils Build and Publish
on:
push:
branches:
- master
paths:
- 'atils/**'
- '.github/workflows/atils-run-ci.yaml'
jobs:
build-and-publish-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get atils version
run: echo "VERSION=$(grep -E '^version = "' atils/pyproject.toml | cut -d'"' -f2)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and publish atils image
uses: docker/build-push-action@v6
with:
push: true
file: atils/Dockerfile
context: atils
tags: |
aidanhilt/atils:${{ env.VERSION }}
aidanhilt/atils:latest
platforms: linux/amd64, linux/arm64
build-and-publish-python-package:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python with pyproject.toml-specified version
uses: actions/setup-python@v5
with:
python-version-file: 'atils/pyproject.toml'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install -n -vv
working-directory: atils
- name: Build and publish package to PyPI
run: |
poetry config pypi-token.pypi $PYPI_API_TOKEN
poetry build
poetry publish -n -vv
working-directory: atils
env:
PYPI_API_TOKEN: ${{ secrets.ATILS_PYPI_TOKEN }}