-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.84 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
name: Release
on:
push:
tags:
- '**'
concurrency:
group: ci-release-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-22.04-arm') || 'ubuntu-22.04' }}
strategy:
fail-fast: false
matrix:
arch: [ amd64, arm64 ]
container:
image: ubuntu:20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
# Needed by containerd go package - build time dep, no runtime.
- name: Install plugin deps
run: apt-get update && apt-get install -y --no-install-recommends libbtrfs-dev
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go-worker/go.mod
- name: Build plugin library
run: make libcontainer.so
- name: Upload artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: libcontainer-${{ matrix.arch }}
path: 'libcontainer.so'
release:
needs: [build]
runs-on: 'ubuntu-latest'
steps:
- name: Download amd64 plugin
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: libcontainer-amd64
- name: Rename amd64 library
run: mv libcontainer.so libcontainer_amd64.so
- name: Download arm64 plugin
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: libcontainer-arm64
- name: Rename amd64 library
run: mv libcontainer.so libcontainer_arm64.so
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
libcontainer_amd64.so
libcontainer_arm64.so