@@ -59,20 +59,20 @@ jobs:
5959 args : dioxus-cli --force
6060
6161 - name : Install Linux dependencies
62- if : matrix.os == 'ubuntu-22.04'
62+ if : ${{ matrix.os == 'ubuntu-22.04' }}
6363 run : |
6464 sudo apt-get update
6565 sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
6666
6767 - name : Install wasm-bindgen-cli
68- if : matrix.platform == 'web'
68+ if : ${{ matrix.platform == 'web' }}
6969 uses : actions-rs/cargo@v1
7070 with :
7171 command : install
7272 args : wasm-bindgen-cli
7373
7474 - name : Install wasm-opt
75- if : matrix.platform == 'web'
75+ if : ${{ matrix.platform == 'web' }}
7676 run : |
7777 if [ "$RUNNER_OS" == "Linux" ]; then
7878 curl -L https://github.com/WebAssembly/binaryen/releases/download/version_111/binaryen-version_111-x86_64-linux.tar.gz | tar xz
@@ -85,20 +85,20 @@ jobs:
8585 shell : bash
8686
8787 - name : Build for Web
88- if : matrix.platform == 'web'
88+ if : ${{ matrix.platform == 'web' }}
8989 run : |
9090 cd opensvm-dioxus
9191 dioxus build --features web --profile wasm-release --platform web --release
9292
9393 - name : Build for Desktop (macOS/Linux)
94- if : matrix.platform == 'desktop' && matrix.os != 'windows-latest'
94+ if : ${{ matrix.platform == 'desktop' && matrix.os != 'windows-latest' }}
9595 run : |
9696 cd opensvm-dioxus
9797 RUSTFLAGS="-C target-cpu=native" dioxus build --features desktop --profile desktop-release --platform desktop --release
9898 shell : bash
9999
100100 - name : Build for Desktop (Windows)
101- if : matrix.platform == 'desktop' && matrix.os == 'windows-latest'
101+ if : ${{ matrix.platform == 'desktop' && matrix.os == 'windows-latest' }}
102102 run : |
103103 cd opensvm-dioxus
104104 $env:RUSTFLAGS="-C target-cpu=native"
@@ -120,5 +120,46 @@ jobs:
120120 release :
121121 name : Create Release
122122 needs : build-and-test
123- if : startsWith(github.ref](#)
123+ if : startsWith(github.ref, 'refs/tags/v')
124+ runs-on : ubuntu-22.04
125+ steps :
126+ - name : Checkout repository
127+ uses : actions/checkout@v4
128+
129+ - name : Download all artifacts
130+ uses : actions/download-artifact@v4
131+ with :
132+ path : artifacts
133+
134+ - name : Prepare release assets
135+ run : |
136+ mkdir -p release-assets
137+
138+ # Web (WASM)
139+ if [ -d "artifacts/opensvm-dioxus-ubuntu-22.04-web/web" ]; then
140+ cd artifacts/opensvm-dioxus-ubuntu-22.04-web/web
141+ zip -r ../../../release-assets/opensvm-dioxus-web.zip .
142+ cd ../../..
143+ fi
144+
145+ # macOS
146+ if [ -d "artifacts/opensvm-dioxus-macos-latest-desktop/desktop" ]; then
147+ cd artifacts/opensvm-dioxus-macos-latest-desktop/desktop
148+ zip -r ../../../release-assets/opensvm-dioxus-macos.zip .
149+ cd ../../..
150+ fi
151+
152+ # Windows
153+ if [ -d "artifacts/opensvm-dioxus-windows-latest-desktop/desktop" ]; then
154+ cd artifacts/opensvm-dioxus-windows-latest-desktop/desktop
155+ zip -r ../../../release-assets/opensvm-dioxus-windows.zip .
156+ cd ../../..
157+ fi
158+ shell : bash
159+
160+ - name : Create GitHub Release
161+ id : create_release
162+ uses : softprops/action-gh-release@v1
163+ with :
164+ files : release-assets](#)
124165
0 commit comments