-
Notifications
You must be signed in to change notification settings - Fork 40
95 lines (82 loc) · 3.11 KB
/
release_artefacts.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
92
93
94
95
name: Generate sink service and Transport wheel
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and extract sinkService
uses: docker/build-push-action@v2
with:
context: .
file: docker/sink_service/Dockerfile
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
push: false
target: export
outputs: ./artifacts/sinkService/
- name: Build and extract transportService wheel
uses: docker/build-push-action@v2
with:
context: .
file: docker/transport_service/Dockerfile
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
push: false
target: export
outputs: ./artifacts/transportService/
- name: Get wheel name
id: wheel_name
run: |
WHEEL_NAME=$(find ./artifacts/transportService/linux_arm_v7/ -maxdepth 1 -type f -name '*.tar.gz' -printf "%f")
echo "::set-output name=wheel_name::$WHEEL_NAME"
- name: Store artefacts localy
uses: actions/upload-artifact@v2
with:
name: binaries
path: ./artifacts/
- name: Get release url
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Armv7 SinkService
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./artifacts/sinkService/linux_arm_v7/sinkService
asset_name: sinkService-${{ github.event.release.tag_name }}-arm
asset_content_type: application/octet-stream
- name: Upload amd64 SinkService
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./artifacts/sinkService/linux_amd64/sinkService
asset_name: sinkService-${{ github.event.release.tag_name }}-amd64
asset_content_type: application/octet-stream
- name: Upload tar.gz wheel
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./artifacts/transportService/linux_amd64/${{ steps.wheel_name.outputs.wheel_name }}
asset_name: ${{ steps.wheel_name.outputs.wheel_name }}
asset_content_type: application/octet-stream
- name: Publish package to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PWD }}
packages_dir: ./artifacts/transportService/linux_amd64/