-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (116 loc) · 3.75 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Release
on:
release:
types: [created]
jobs:
get-release:
runs-on: ubuntu-latest
steps:
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dump upload url to file
run: echo '${{ steps.get_release.outputs.upload_url }}' > upload_url
- name: Upload upload_url
uses: actions/upload-artifact@v3
with:
name: upload_url
path: upload_url
build:
needs: get-release
runs-on: ubuntu-latest
steps:
- name: Download upload_url
uses: actions/download-artifact@v3
with:
name: upload_url
path: upload_url
- name: Set upload_url
run: echo "UPLOAD_URL=$(cat upload_url/upload_url)" >> $GITHUB_ENV
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
path: './build'
- name: Make packaging script executable
run: chmod +x ./build/package.sh
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu_latest
setup: |
mkdir -p "${PWD}/build"
# Mount the build directory as /build in the container
dockerRunArgs: |
--volume "${PWD}/build:/build"
#--volume "${PWD}/package:/package"
# Pass some environment variables to the container
#env: | # YAML, but pipe character is necessary
#artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# Not required, but speeds up builds by storing container images in
# a GitHub package registry. Make sure there are no secrets in the disk image!
githubToken: ${{ github.token }}
install: |
apt update -q -y
apt install software-properties-common -y
add-apt-repository ppa:deadsnakes/ppa
apt-get update -q -y
apt install -y \
autoconf \
automake \
build-essential \
ca-certificates \
curl \
git \
libbz2-dev \
libc6-dev \
libffi-dev \
libgdbm-dev \
libjpeg-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libudev-dev \
python3.11 \
python3-pip \
openssl \
pkg-config \
sudo \
wget \
zlib1g-dev \
libcairo2-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
software-properties-common \
python3-dev \
python3-dbus \
python3-wheel
run: |
cd build
chmod +x package.sh
ADDON_ARCH=linux-arm64 ./package.sh
- name: List after container
run: |
ls -lh
shell: bash
- name: Upload Release Asset tgz
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: build/matter-adapter-${{ env.RELEASE_VERSION }}-linux-arm64-v3.11.tgz
- name: Upload Release Asset shasum
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: build/matter-adapter-${{ env.RELEASE_VERSION }}-linux-arm64-v3.11.tgz.sha256sum