1- name : Release
21
3- # on:
4- # push:
5- # tags:
6- # - 'v[0-9]+.[0-9]+.[0-9]+'
2+ name : Release
73
84on :
95 release :
106 types : [created]
117
12-
138jobs :
149 get-release :
1510 runs-on : ubuntu-latest
@@ -27,35 +22,11 @@ jobs:
2722 name : upload_url
2823 path : upload_url
2924
30-
3125 build :
3226 needs : get-release
33- strategy :
34- matrix :
35- platform : [
36- ' linux-arm' ,
37- ' linux-arm64'
38- ]
39- pair : [
40- ' python:3.9' ,
41- ' python:3.11' ,
42- ]
43- include :
44- - platform : ' linux-arm'
45- host-os : ' ubuntu-latest'
46- - platform : ' linux-arm64'
47- host-os : ' ubuntu-latest'
48- - pair : ' python:3.9'
49- language : ' python'
50- version : ' 3.9'
51- - pair : ' python:3.11'
52- language : ' python'
53- version : ' 3.11'
54-
55- runs-on : ${{ matrix.host-os }}
56-
57-
27+ runs-on : ubuntu-latest
5828 steps :
29+
5930 - name : Download upload_url
6031 uses : actions/download-artifact@v4
6132 with :
@@ -65,32 +36,65 @@ jobs:
6536 run : echo "UPLOAD_URL=$(cat upload_url/upload_url)" >> $GITHUB_ENV
6637 - name : Set release version
6738 run : echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
39+
6840 - uses : actions/checkout@v3
69- - name : Use Python ${{ matrix.version }}
70- uses : actions/setup-python@v4
7141 with :
72- python-version : ${{ matrix.version }}
73- - name : Make build script executable
74- run : chmod +x ./build.sh
42+ path : ' ./build'
7543 - name : Make packaging script executable
76- run : chmod +x ./package.sh
77- - name : Build adapter
44+ run : chmod +x ./build/package.sh
45+ - uses : uraimo/run-on-arch-action@v2
46+ name : Build on ubuntu-20.04 aarch64
47+ id : runcmd
48+ with :
49+ arch : aarch64
50+ distro : ubuntu20.04
51+ setup : |
52+ echo "."
53+ echo ".."
54+ echo "run-on-arch setup"
55+ mkdir -p "${PWD}/build"
56+
57+ # Mount the build directory as /build in the container
58+ dockerRunArgs : |
59+ --volume "${PWD}/build:/build"
60+ #--volume "${PWD}/package:/package"
61+
62+ # Pass some environment variables to the container
63+ # env: | # YAML, but pipe character is necessary
64+ # artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
65+
66+ # Not required, but speeds up builds by storing container images in
67+ # a GitHub package registry. Make sure there are no secrets in the disk image!
68+ githubToken : ${{ github.token }}
69+
70+ shell : /bin/bash
71+
72+ install : |
73+ echo "."
74+ echo "INSTALL"
75+
76+ run : |
77+ cd build
78+ chmod +x package.sh
79+ ADDON_ARCH=linux-arm64 ./package.sh
80+
81+ - name : List after container
7882 run : |
79- ./build.sh "${{ matrix.platform }}" "${{ matrix.language }}" "${{ matrix.version }}"
83+ ls -lh
8084 shell : bash
8185
8286 - name : Upload Release Asset tgz
8387 uses : shogo82148/actions-upload-release-asset@v1
8488 with :
85- # upload_url: ${{ github.event.release.upload_url }}
8689 upload_url : ${{ env.UPLOAD_URL }}
87- asset_path : buttoninput-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}-v${{ matrix.version }} .tgz
90+ asset_path : build/ buttoninput-${{ env.RELEASE_VERSION }}-linux-arm64-v3.11 .tgz
8891 overwrite : true
8992
9093 - name : Upload Release Asset shasum
9194 uses : shogo82148/actions-upload-release-asset@v1
9295 with :
93- # upload_url: ${{ github.event.release.upload_url }}
9496 upload_url : ${{ env.UPLOAD_URL }}
95- asset_path : buttoninput-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}-v${{ matrix.version }} .tgz.sha256sum
97+ asset_path : build/ buttoninput-${{ env.RELEASE_VERSION }}-linux-arm64-v3.11 .tgz.sha256sum
9698 overwrite : true
99+
100+
0 commit comments