Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 182 additions & 0 deletions .github/workflows/release-fixed-dx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Custom Release Workflow for Fixed DX Binary
#
# This workflow builds and releases a custom dx binary with bug fixes
# for use by the team and CI systems. Based on the official Dioxus publish workflow
# but modified for custom releases with the 'optimizations' feature.

name: Release Fixed DX Binary

on:
push:
tags:
- "v*-fix.*" # Matches tags like v0.6.3-fix.1, v0.6.3-fix.2, etc.
workflow_dispatch:
inputs:
tag:
required: true
description: "Release tag (e.g., v0.6.3-fix.1)"
type: string

env:
RELEASE_TAG: ${{ github.event.inputs.tag || github.ref_name }}

jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
release_created: ${{ steps.create_release.outputs.release_created }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_TAG }}
name: "Fixed DX Binary ${{ env.RELEASE_TAG }}"
body: |
## Fixed DX Binary Release ${{ env.RELEASE_TAG }}

This is a custom build of the Dioxus CLI (dx) with bug fixes for team use.

### Features
- ✅ Built with `optimizations` feature (includes wasm-opt)
- ✅ Cross-platform binaries (Windows, macOS, Linux)
- ✅ Bug fixes and improvements
- ✅ Compatible with Dioxus v0.6.3

Binaries are being built and will be available shortly...
draft: false
prerelease: ${{ contains(env.RELEASE_TAG, '-fix.') }}

release-cli:
name: Build and Release DX Binary
needs: create-release
permissions:
contents: write
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
# Windows builds
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest

# macOS builds
- target: x86_64-apple-darwin
os: macos-13
- target: aarch64-apple-darwin
os: macos-latest

# Linux builds
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04

# Uncomment for ARM Linux if needed
# - target: aarch64-unknown-linux-gnu
# os: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install OpenSSL on macOS
if: matrix.platform.os == 'macos-latest'
run: brew install openssl

- name: Install NASM for Windows TLS
if: ${{ matrix.platform.target == 'x86_64-pc-windows-msvc' }}
uses: ilammy/setup-nasm@v1

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.81.0" # Use the MSRV for v0.6.3
targets: ${{ matrix.platform.target }}

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
key: ${{ matrix.platform.target }}

- name: Free disk space (Ubuntu)
if: matrix.platform.os == 'ubuntu-22.04'
uses: jlumbroso/free-disk-space@v1.3.1
with:
large-packages: false
docker-images: false
swap-storage: false

- name: Build and upload CLI binaries
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: dx
token: ${{ secrets.GITHUB_TOKEN }}
target: ${{ matrix.platform.target }}
archive: dx-$target-${{ env.RELEASE_TAG }}
checksum: sha256
manifest_path: packages/cli/Cargo.toml
features: optimizations # Use optimizations feature (includes wasm-opt)

create-release-notes:
name: Create Release Notes
needs: release-cli
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create or update release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_TAG }}
name: "Fixed DX Binary ${{ env.RELEASE_TAG }}"
body: |
## Fixed DX Binary Release ${{ env.RELEASE_TAG }}

This is a custom build of the Dioxus CLI (dx) with bug fixes for team use.

### Installation

#### Quick Install (Linux/macOS)
```bash
# Linux x64
curl -L https://github.com/akesson/dioxus/releases/download/${{ env.RELEASE_TAG }}/dx-x86_64-unknown-linux-gnu-${{ env.RELEASE_TAG }}.tar.gz | tar -xz && sudo mv dx /usr/local/bin/

# macOS Intel
curl -L https://github.com/akesson/dioxus/releases/download/${{ env.RELEASE_TAG }}/dx-x86_64-apple-darwin-${{ env.RELEASE_TAG }}.tar.gz | tar -xz && sudo mv dx /usr/local/bin/

# macOS Apple Silicon
curl -L https://github.com/akesson/dioxus/releases/download/${{ env.RELEASE_TAG }}/dx-aarch64-apple-darwin-${{ env.RELEASE_TAG }}.tar.gz | tar -xz && sudo mv dx /usr/local/bin/
```

#### CI Installation
```yaml
- name: Install fixed dx
run: |
curl -L https://github.com/akesson/dioxus/releases/download/${{ env.RELEASE_TAG }}/dx-x86_64-unknown-linux-gnu-${{ env.RELEASE_TAG }}.tar.gz | tar -xz
chmod +x dx
sudo mv dx /usr/local/bin/
```

### Features
- ✅ Built with `optimizations` feature (includes wasm-opt)
- ✅ Cross-platform binaries (Windows, macOS, Linux)
- ✅ Bug fixes and improvements
- ✅ Compatible with Dioxus v0.6.3

### Verification
```bash
dx --version # Should show: dioxus 0.6.3 (custom build)
```
draft: false
prerelease: ${{ contains(env.RELEASE_TAG, '-fix.') }}
57 changes: 57 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ cargo_metadata = "0.18.1"
parking_lot = "0.12.1"
tracing-wasm = "0.2.1"
console_error_panic_hook = "0.1.7"
fs-err = "3.1.1"

# desktop
wry = { version = "0.45.0", default-features = false }
Expand Down
Loading