|
6 | 6 |
|
7 | 7 | jobs:
|
8 | 8 | build:
|
9 |
| - runs-on: ubuntu-latest |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: |
| 12 | + - ubuntu-latest |
| 13 | + - windows-latest |
| 14 | + - macos-latest |
| 15 | + include: |
| 16 | + - os: windows-latest |
| 17 | + extension: .exe |
| 18 | + runs-on: ${{ matrix.os }} |
10 | 19 | steps:
|
11 | 20 | - name: Checkout sources
|
12 | 21 | uses: actions/checkout@v4
|
13 | 22 |
|
14 | 23 | - name: Build release binary
|
15 | 24 | run: cargo build --release --locked
|
16 | 25 |
|
17 |
| - - uses: actions/upload-artifact@v4 |
| 26 | + - name: Upload Artifact |
| 27 | + uses: actions/upload-artifact@v4 |
18 | 28 | with:
|
19 |
| - name: linux |
20 |
| - path: target/release/pbls |
21 |
| - |
22 |
| - # publish: |
23 |
| - # name: Publish |
24 |
| - # needs: [build] |
25 |
| - # runs-on: ubuntu-latest |
26 |
| - # steps: |
27 |
| - # - name: Checkout sources |
28 |
| - # uses: actions/checkout@v4 |
29 |
| - |
30 |
| - # - uses: actions/download-artifact@v4 |
31 |
| - |
32 |
| - # - name: Build archive |
33 |
| - # shell: bash |
34 |
| - # run: | |
35 |
| - # set -ex |
36 |
| - |
37 |
| - # source="$(pwd)" |
38 |
| - # mkdir -p runtime/grammars/sources |
39 |
| - # tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources |
40 |
| - # rm -rf grammars |
41 |
| - |
42 |
| - # cd "$(mktemp -d)" |
43 |
| - # mv $source/bins-* . |
44 |
| - # mkdir dist |
45 |
| - |
46 |
| - # for dir in bins-* ; do |
47 |
| - # platform=${dir#"bins-"} |
48 |
| - # if [[ $platform =~ "windows" ]]; then |
49 |
| - # exe=".exe" |
50 |
| - # fi |
51 |
| - # pkgname=helix-$GITHUB_REF_NAME-$platform |
52 |
| - # mkdir -p $pkgname |
53 |
| - # cp $source/LICENSE $source/README.md $pkgname |
54 |
| - # mkdir $pkgname/contrib |
55 |
| - # cp -r $source/contrib/completion $pkgname/contrib |
56 |
| - # mv bins-$platform/runtime $pkgname/ |
57 |
| - # mv bins-$platform/hx$exe $pkgname |
58 |
| - # chmod +x $pkgname/hx$exe |
59 |
| - |
60 |
| - # if [[ "$platform" = "x86_64-linux" ]]; then |
61 |
| - # mv bins-$platform/helix-*.AppImage* dist/ |
62 |
| - # fi |
63 |
| - |
64 |
| - # if [ "$exe" = "" ]; then |
65 |
| - # tar cJf dist/$pkgname.tar.xz $pkgname |
66 |
| - # else |
67 |
| - # 7z a -r dist/$pkgname.zip $pkgname |
68 |
| - # fi |
69 |
| - # done |
70 |
| - |
71 |
| - # tar cJf dist/helix-$GITHUB_REF_NAME-source.tar.xz -C $source . |
72 |
| - # mv dist $source/ |
73 |
| - |
74 |
| - # - name: Upload binaries to release |
75 |
| - # uses: svenstaro/upload-release-action@v2 |
76 |
| - # if: env.preview == 'false' |
77 |
| - # with: |
78 |
| - # repo_token: ${{ secrets.GITHUB_TOKEN }} |
79 |
| - # file: dist/* |
80 |
| - # file_glob: true |
81 |
| - # tag: ${{ github.ref_name }} |
82 |
| - # overwrite: true |
83 |
| - |
84 |
| - # - name: Upload binaries as artifact |
85 |
| - # uses: actions/upload-artifact@v4 |
86 |
| - # if: env.preview == 'true' |
87 |
| - # with: |
88 |
| - # name: release |
89 |
| - # path: dist/* |
| 29 | + name: ${{ matrix.os }} |
| 30 | + path: target/release/pbls${{ matrix.extension }} |
| 31 | + if-no-files-found: error |
90 | 32 |
|
| 33 | + publish: |
| 34 | + needs: [build] |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - name: Download Artifacts |
| 38 | + uses: actions/download-artifact@v4 |
| 39 | + |
| 40 | + - name: Create Release |
| 41 | + env: |
| 42 | + GH_TOKEN: ${{ github.token }} |
| 43 | + run: | |
| 44 | + gh release create ${{ github.ref_name }} */pbls* -R ${{ github.action_repository }} |
0 commit comments