1
- name : Release
1
+ name : Release Build
2
2
3
3
env :
4
4
PROJECT_NAME : code2prompt
10
10
types : [published]
11
11
12
12
jobs :
13
- release :
14
- name : Release
13
+ build :
14
+ name : Build
15
15
runs-on : ${{ matrix.job.os }}
16
16
strategy :
17
17
fail-fast : false
25
25
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , use-cross: use-cross }
26
26
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , use-cross: use-cross }
27
27
- { os: macos-latest , target: x86_64-apple-darwin }
28
+ - { os: macos-latest , target: aarch64-apple-darwin }
28
29
- { os: windows-latest , target: i686-pc-windows-gnu }
29
30
- { os: windows-latest , target: i686-pc-windows-msvc }
30
31
- { os: windows-latest , target: x86_64-pc-windows-gnu }
@@ -38,19 +39,26 @@ jobs:
38
39
target : ${{ matrix.job.target }}
39
40
override : true
40
41
default : true
42
+ - name : Install cross-compilation dependencies
43
+ if : matrix.job.target == 'arm-unknown-linux-gnueabihf' || matrix.job.target == 'aarch64-unknown-linux-gnu'
44
+ run : |
45
+ sudo apt-get update
46
+ sudo apt-get install -y gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
41
47
- name : Build release binary
42
48
uses : actions-rs/cargo@v1
43
49
with :
44
50
use-cross : ${{ matrix.job.use-cross }}
45
51
command : build
46
- args : --release --target ${{ matrix.job.target }}
52
+ args : --release --target ${{ matrix.job.target }} --verbose
47
53
- name : Strip release binary (unix)
48
54
if : matrix.job.target != 'x86_64-pc-windows-msvc'
49
55
run : strip "target/${{ matrix.job.target }}/release/code2prompt"
50
- - name : Upload release archive
51
- uses : softprops/action-gh-release@v1
52
- with :
53
- files : |
54
- target/${{ matrix.job.target }}/release/code2prompt${{ matrix.job.target == 'x86_64-pc-windows-msvc' && '.exe' || '' }}
56
+ - name : Upload release asset
57
+ uses : actions/upload-release-asset@v1
55
58
env :
56
- GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
59
+ GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
60
+ with :
61
+ upload_url : ${{ github.event.release.upload_url }}
62
+ asset_path : target/${{ matrix.job.target }}/release/code2prompt${{ matrix.job.target == 'x86_64-pc-windows-msvc' && '.exe' || '' }}
63
+ asset_name : code2prompt-${{ matrix.job.target }}${{ matrix.job.target == 'x86_64-pc-windows-msvc' && '.exe' || '' }}
64
+ asset_content_type : application/octet-stream
0 commit comments