forked from murbard/pytezos
-
Notifications
You must be signed in to change notification settings - Fork 38
91 lines (76 loc) · 2.47 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Release
on:
push:
tags:
- "*.*.*"
jobs:
release:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Check out the repo
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install binary dependencies
run: OSTYPE=$OSTYPE make install-deps
- name: Install project
run: make install
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
platforms: linux/amd64,linux/arm64
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up metadata (pytezos)
id: meta-pytezos
uses: docker/metadata-action@v3
with:
images: bakingbad/pytezos
tags: type=pep440,pattern={{version}}
- name: Set up metadata (michelson-kernel)
id: meta-michelson-kernel
uses: docker/metadata-action@v3
with:
images: bakingbad/michelson-kernel
tags: type=pep440,pattern={{version}}
- name: Publish stable image (pytezos)
uses: docker/build-push-action@v3
with:
context: .
file: pytezos.dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-pytezos.outputs.tags }}
labels: ${{ steps.meta-pytezos.outputs.labels }}
- name: Publish stable image (michelson-kernel)
uses: docker/build-push-action@v3
with:
context: .
file: michelson-kernel.dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-michelson-kernel.outputs.tags }}
labels: ${{ steps.meta-michelson-kernel.outputs.labels }}
- name: Poetry publish
run: |
poetry config http-basic.pypi __token__ ${{secrets.PYPI_TOKEN}}
poetry build
poetry publish
- name: Build GitHub release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false