|
11 | 11 | strategy: |
12 | 12 | matrix: |
13 | 13 | os: [ macos-13, windows-latest, ubuntu-22.04 ] |
14 | | - arch: [ x64, arm64 ] |
15 | | - exclude: |
16 | | - - os: macos-13 |
17 | | - arch: arm64 |
18 | | - - os: windows-latest |
19 | | - arch: arm64 |
| 14 | + arch: [ x64 ] |
20 | 15 |
|
21 | 16 | steps: |
22 | 17 | - uses: actions/checkout@v3 |
|
27 | 22 | python-version: '3.10.x' |
28 | 23 | architecture: x64 |
29 | 24 |
|
30 | | - - name: Build OctoBot Binary on Linux arm64 |
31 | | - if: matrix.os == 'ubuntu-22.04' && matrix.arch == 'arm64' |
32 | | - |
33 | | - with: |
34 | | - arch: aarch64 |
35 | | - distro: ubuntu22.04 |
36 | | - githubToken: ${{ github.token }} |
37 | | - env: | |
38 | | - GH_REPO: Drakkar-Software/OctoBot-Tentacles |
39 | | - OCTOBOT_GH_REPO: https://github.com/Drakkar-Software/OctoBot.git |
40 | | - OCTOBOT_DEFAULT_BRANCH: dev |
41 | | - OCTOBOT_REPOSITORY_DIR: OctoBot |
42 | | - NLTK_DATA: nltk_data |
43 | | - BUILD_ARCH: ${{ matrix.arch }} |
44 | | - run: | |
45 | | - apt-get update |
46 | | - apt-get install -y --no-install-recommends python3.10 python3-pip python3-dev git gcc musl-dev libc-dev build-essential zlib1g zlib1g-dev |
47 | | - bash ./build_scripts/unix.sh |
48 | | -
|
49 | 25 | - name: Build OctoBot Binary on Linux |
50 | 26 | if: matrix.os == 'ubuntu-22.04' && matrix.arch == 'x64' |
51 | 27 | env: |
@@ -103,100 +79,12 @@ jobs: |
103 | 79 | path: OctoBot/dist/OctoBot_windows.exe |
104 | 80 | if-no-files-found: error |
105 | 81 |
|
106 | | - create-release: |
107 | | - name: Create Release |
108 | | - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') |
109 | | - needs: builds |
110 | | - runs-on: ubuntu-22.04 |
111 | | - steps: |
112 | | - - name: Download artifacts |
113 | | - uses: actions/download-artifact@v4 |
114 | | - |
115 | | - - name: Set version as environement var |
116 | | - id: vars |
117 | | - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} |
118 | | - |
119 | | - - name: Clean artifact names |
120 | | - run: | |
121 | | - sudo apt-get update |
122 | | - sudo apt-get install rename -y |
123 | | - find . -type f -exec bash -c 'mv $1 $(basename $(dirname $1)).tmp && rm -rf $(basename $(dirname $1)) && rename 's/\.tmp$//' *.tmp' _ {} \; |
124 | | -
|
125 | | - - name: Compute hashes |
126 | | - id: hashes |
127 | | - run: | |
128 | | - echo ::set-output name=octobot_linux_x64_hash::$(openssl sha256 ./OctoBot_linux_x64 | awk '{print $2}') |
129 | | - echo ::set-output name=octobot_linux_arm64_hash::$(openssl sha256 ./OctoBot_linux_arm64 | awk '{print $2}') |
130 | | - echo ::set-output name=octobot_macos_x64_hash::$(openssl sha256 ./OctoBot_macos_x64 | awk '{print $2}') |
131 | | - echo ::set-output name=octobot_windows_x64_hash::$(openssl sha256 ./OctoBot_windows_x64.exe | awk '{print $2}') |
132 | | -
|
133 | | - - name: Create Release |
134 | | - id: create_release |
135 | | - uses: actions/create-release@v1 |
136 | | - env: |
137 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
138 | | - with: |
139 | | - tag_name: ${{ steps.vars.outputs.tag }} |
140 | | - release_name: Release - ${{ steps.vars.outputs.tag }} |
141 | | - owner: ${{ github.repository_owner }} |
142 | | - repo: OctoBot |
143 | | - draft: true |
144 | | - prerelease: false |
145 | | - commitish: master |
146 | | - body: | |
147 | | - | Binary | Download link | SHA256 | |
148 | | - | ------------- |:-------------:|:-------------:| |
149 | | - | Windows x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_windows_x64.exe) | ${{ steps.hashes.outputs.octobot_windows_x64_hash }} | |
150 | | - | Linux x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_linux_x64) | ${{ steps.hashes.outputs.octobot_linux_x64_hash }} | |
151 | | - | Linux arm64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_linux_arm64) | ${{ steps.hashes.outputs.octobot_linux_arm64_hash }} | |
152 | | - | MacOS x64 | [Download](https://github.com/${{ github.repository_owner }}/OctoBot/releases/download/${{ steps.vars.outputs.tag }}/OctoBot_macos_x64) | ${{ steps.hashes.outputs.octobot_macos_x64_hash }} | |
153 | | -
|
154 | | - - name: Upload Release Asset |
155 | | - uses: actions/upload-release-asset@v1 |
156 | | - env: |
157 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
158 | | - with: |
159 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
160 | | - asset_path: ./OctoBot_windows_x64.exe |
161 | | - asset_name: OctoBot_windows_x64.exe |
162 | | - asset_content_type: application/x-binary |
163 | | - |
164 | | - - name: Upload Release Asset |
165 | | - uses: actions/upload-release-asset@v1 |
166 | | - env: |
167 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
168 | | - with: |
169 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
170 | | - asset_path: ./OctoBot_linux_x64 |
171 | | - asset_name: OctoBot_linux_x64 |
172 | | - asset_content_type: application/x-binary |
173 | | - |
174 | | - - name: Upload Release Asset |
175 | | - uses: actions/upload-release-asset@v1 |
176 | | - env: |
177 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
178 | | - with: |
179 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
180 | | - asset_path: ./OctoBot_linux_arm64 |
181 | | - asset_name: OctoBot_linux_arm64 |
182 | | - asset_content_type: application/x-binary |
183 | | - |
184 | | - - name: Upload Release Asset |
185 | | - uses: actions/upload-release-asset@v1 |
186 | | - env: |
187 | | - GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }} |
188 | | - with: |
189 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
190 | | - asset_path: ./OctoBot_macos_x64 |
191 | | - asset_name: OctoBot_macos_x64 |
192 | | - asset_content_type: application/x-binary |
193 | 82 |
|
194 | 83 | notify: |
195 | 84 | name: Notify |
196 | 85 | runs-on: ubuntu-22.04 |
197 | 86 | needs: |
198 | 87 | - builds |
199 | | - - create-release |
200 | 88 | if: ${{ failure() }} |
201 | 89 |
|
202 | 90 | steps: |
|
0 commit comments