File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : mle_release
2+
3+ on :
4+ # release:
5+ # types: [published]
6+ pull_request :
7+
8+ jobs :
9+ mle_release_job :
10+
11+ strategy :
12+ matrix :
13+ include :
14+ - { runner: ubuntu-latest, cc: musl-gcc, extra: 'mle_static=1' }
15+ - { runner: ubuntu-24.04-arm, cc: musl-gcc, extra: 'mle_static=1' }
16+ - { runner: macos-latest, cc: cc, extra: '' }
17+
18+ runs-on : ${{ matrix.runner }}
19+
20+ steps :
21+ - name : checkout
22+ uses : actions/checkout@v4
23+ with :
24+ submodules : recursive
25+
26+ - name : install_musl
27+ if : matrix.cc == 'musl-gcc'
28+ run : sudo apt-get install -y musl-tools
29+
30+ - name : build
31+ run : make mle_vendor=1 CC=${{ matrix.cc }} ${{ matrix.extra }} && ./mle -v
32+
33+ - name : name_binary
34+ id : name
35+ run : |
36+ vers=$(./mle -v | awk '{print $NF}')
37+ os_arch="$(uname -s | tr A-Z a-z)_$(uname -m)"
38+ name="mle_${vers}_${os_arch}"
39+ mv -v mle "$name"
40+ echo "name=$name" >>"$GITHUB_OUTPUT"
41+
42+ - name : upload_pr_artifact
43+ if : github.event_name == 'pull_request'
44+ uses : actions/upload-artifact@v4
45+ with :
46+ name : ${{ steps.name.outputs.name }}
47+ path : ${{ steps.name.outputs.name }}
48+
49+ - name : upload_release
50+ if : github.event_name == 'release'
51+ uses : softprops/action-gh-release@v2
52+ with :
53+ files : ${{ steps.name.outputs.name }}
You can’t perform that action at this time.
0 commit comments