|
3 | 3 | push: |
4 | 4 | tags: |
5 | 5 | - "*" |
6 | | - pull_request: |
7 | 6 |
|
8 | 7 | jobs: |
9 | 8 | build: |
|
36 | 35 | # Regular build for non-MUSL targets |
37 | 36 | - name: Build (non-MUSL) |
38 | 37 | if: matrix.name != 'linux-musl' |
39 | | - run: cargo build --release --locked |
| 38 | + run: cargo build --release --all-features --locked |
40 | 39 |
|
41 | 40 | # Native MUSL build using Alpine Docker |
42 | 41 | - name: Build (MUSL) |
|
47 | 46 | apk add --no-cache musl-dev binutils g++ |
48 | 47 |
|
49 | 48 | # Build the project |
50 | | - cargo build --release --locked |
| 49 | + cargo build --release --all-features --locked |
51 | 50 | ' |
52 | 51 |
|
53 | 52 | - name: "Upload assets" |
@@ -106,44 +105,44 @@ jobs: |
106 | 105 | ./ic-wasm --version |
107 | 106 |
|
108 | 107 | publish: |
109 | | - # Check if the workflow was triggered by a tag |
110 | | - if: startsWith(github.ref, 'refs/tags/') |
111 | | - needs: test |
112 | | - name: Publish ${{ matrix.asset_name }} |
113 | | - strategy: |
114 | | - fail-fast: false |
115 | | - matrix: |
116 | | - include: |
117 | | - - asset_name: ic-wasm-linux64 |
118 | | - binstall_name: ic-wasm-x86_64-unknown-linux-gnu.tar.gz |
119 | | - - asset_name: ic-wasm-linux-musl |
120 | | - binstall_name: ic-wasm-x86_64-unknown-linux-musl.tar.gz |
121 | | - - asset_name: ic-wasm-macos |
122 | | - binstall_name: ic-wasm-x86_64-apple-darwin.tar.gz |
| 108 | + name: GitHub Release |
123 | 109 | runs-on: ubuntu-latest |
| 110 | + needs: test |
124 | 111 | steps: |
125 | | - - name: Get executable |
| 112 | + - name: Get executables |
126 | 113 | uses: actions/download-artifact@v4 |
127 | | - with: |
128 | | - name: ${{ matrix.asset_name }} |
129 | | - |
130 | | - - name: Upload binaries to release |
131 | | - uses: svenstaro/upload-release-action@v2 |
132 | | - with: |
133 | | - repo_token: ${{ secrets.GITHUB_TOKEN }} |
134 | | - file: ic-wasm |
135 | | - asset_name: ${{ matrix.asset_name }} |
136 | | - tag: ${{ github.ref }} |
| 114 | + # Download all artifacts, files will be at: |
| 115 | + # ic-wasm-linux64/ic-wasm |
| 116 | + # ic-wasm-linux-musl/ic-wasm |
| 117 | + # ic-wasm-macos/ic-wasm |
137 | 118 |
|
138 | | - - name: Bundle for binstall |
| 119 | + - name: Prepare artifacts |
139 | 120 | run: | |
| 121 | + mkdir artifacts |
| 122 | +
|
| 123 | + pushd ic-wasm-linux64 |
| 124 | + chmod +x ic-wasm |
| 125 | + tar -cvzf ic-wasm-x86_64-unknown-linux-gnu.tar.gz ic-wasm |
| 126 | + mv ic-wasm ic-wasm-linux64 |
| 127 | + mv * ../artifacts |
| 128 | + popd |
| 129 | +
|
| 130 | + pushd ic-wasm-linux-musl |
| 131 | + chmod +x ic-wasm |
| 132 | + tar -cvzf ic-wasm-x86_64-unknown-linux-musl.tar.gz ic-wasm |
| 133 | + mv ic-wasm ic-wasm-linux-musl |
| 134 | + mv * ../artifacts |
| 135 | + popd |
| 136 | +
|
| 137 | + pushd ic-wasm-macos |
140 | 138 | chmod +x ic-wasm |
141 | | - tar -cvzf ${{ matrix.binstall_name }} ic-wasm |
| 139 | + tar -cvzf ic-wasm-x86_64-apple-darwin.tar.gz ic-wasm |
| 140 | + mv ic-wasm ic-wasm-macos |
| 141 | + mv * ../artifacts |
| 142 | + popd |
142 | 143 |
|
143 | | - - name: Upload binstall binaries to release |
144 | | - uses: svenstaro/upload-release-action@v2 |
| 144 | + - name: Create GitHub Release |
| 145 | + uses: softprops/action-gh-release@v2 |
145 | 146 | with: |
146 | | - repo_token: ${{ secrets.GITHUB_TOKEN }} |
147 | | - file: ${{ matrix.binstall_name }} |
148 | | - asset_name: ${{ matrix.binstall_name }} |
149 | | - tag: ${{ github.ref }} |
| 147 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 148 | + files: artifacts/* |
0 commit comments