Merge pull request #1960 from DioxusLabs/jk/05-pre
autorelease workflow
This commit is contained in:
22 files changed
+532
-420
No files matched your search
@@ -1,12 +0,0 @@
|
|||||||
df -h
|
|
||||||
sudo rm -rf ${GITHUB_WORKSPACE}/.git
|
|
||||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
||||||
sudo rm -rf /usr/share/dotnet
|
|
||||||
sudo apt-get remove -y '^ghc-8.*'
|
|
||||||
sudo apt-get remove -y '^dotnet-.*'
|
|
||||||
sudo apt-get remove -y '^llvm-.*'
|
|
||||||
sudo apt-get remove -y 'php.*'
|
|
||||||
sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel
|
|
||||||
sudo apt-get autoremove -y
|
|
||||||
sudo apt-get clean
|
|
||||||
df -h
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
name: Build CLI for Release
|
|
||||||
|
|
||||||
# Will run automatically on every new release
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-upload:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
runs-on: ${{ matrix.platform.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- {
|
|
||||||
target: x86_64-pc-windows-msvc,
|
|
||||||
os: windows-latest,
|
|
||||||
toolchain: "1.70.0",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
target: x86_64-apple-darwin,
|
|
||||||
os: macos-latest,
|
|
||||||
toolchain: "1.70.0",
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
target: x86_64-unknown-linux-gnu,
|
|
||||||
os: ubuntu-latest,
|
|
||||||
toolchain: "1.70.0",
|
|
||||||
}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install stable
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.platform.toolchain }}
|
|
||||||
targets: ${{ matrix.platform.target }}
|
|
||||||
|
|
||||||
- uses: ilammy/setup-nasm@v1
|
|
||||||
|
|
||||||
# Setup the Github Actions Cache for the CLI package
|
|
||||||
- name: Setup cache
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: packages/cli -> ../../target
|
|
||||||
|
|
||||||
# This neat action can build and upload the binary in one go!
|
|
||||||
- name: Build and upload binary
|
|
||||||
uses: taiki-e/upload-rust-binary-action@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
target: ${{ matrix.platform.target }}
|
|
||||||
bin: dx
|
|
||||||
archive: dx-${{ matrix.platform.target }}
|
|
||||||
checksum: sha256
|
|
||||||
manifest_path: packages/cli/Cargo.toml
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
name: docs stable
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: docs
|
|
||||||
steps:
|
|
||||||
|
|
||||||
# NOTE: Comment out when https://github.com/rust-lang/mdBook/pull/1306 is merged and released
|
|
||||||
# - name: Setup mdBook
|
|
||||||
# uses: peaceiris/actions-mdbook@v1
|
|
||||||
# with:
|
|
||||||
# mdbook-version: "0.4.10"
|
|
||||||
|
|
||||||
# NOTE: Delete when the previous one is enabled
|
|
||||||
- name: Setup mdBook
|
|
||||||
run: |
|
|
||||||
cargo install mdbook --git https://github.com/Demonthos/mdBook.git --branch master
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cd docs &&
|
|
||||||
cd guide && mdbook build -d ../nightly/guide && cd .. &&
|
|
||||||
cd router && mdbook build -d ../nightly/router && cd ..
|
|
||||||
# cd reference && mdbook build -d ../nightly/reference && cd .. &&
|
|
||||||
# cd fermi && mdbook build -d ../nightly/fermi && cd ..
|
|
||||||
|
|
||||||
- name: Deploy 🚀
|
|
||||||
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
|
||||||
with:
|
|
||||||
branch: gh-pages # The branch the action should deploy to.
|
|
||||||
folder: docs/nightly # The folder the action should deploy.
|
|
||||||
target-folder: docs
|
|
||||||
repository-name: dioxuslabs/docsite
|
|
||||||
clean: false
|
|
||||||
token: ${{ secrets.DEPLOY_KEY }} # let's pretend I don't need it for now
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
name: Deploy Nightly Docs
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
name: Build & Deploy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- run: sudo apt-get update
|
|
||||||
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
|
||||||
with:
|
|
||||||
toolchain: nightly-2024-02-01
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
cache-all-crates: "true"
|
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
||||||
- uses: ilammy/setup-nasm@v1
|
|
||||||
|
|
||||||
- name: cargo doc
|
|
||||||
run: cargo doc --no-deps --workspace --all-features
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
|
||||||
with:
|
|
||||||
branch: gh-pages
|
|
||||||
folder: target/doc
|
|
||||||
target-folder: api-docs/nightly
|
|
||||||
repository-name: dioxuslabs/docsite
|
|
||||||
clean: false
|
|
||||||
token: ${{ secrets.DEPLOY_KEY }}
|
|
||||||
+31
-22
@@ -1,3 +1,7 @@
|
|||||||
|
# Whenever an open PR is updated, the workflow will be triggered
|
||||||
|
#
|
||||||
|
# This can get expensive, so we do a lot of caching and checks to prevent unnecessary runs
|
||||||
|
|
||||||
name: Rust CI
|
name: Rust CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -75,7 +79,6 @@ jobs:
|
|||||||
large-packages: false
|
large-packages: false
|
||||||
docker-images: false
|
docker-images: false
|
||||||
swap-storage: false
|
swap-storage: false
|
||||||
|
|
||||||
- run: cargo make tests
|
- run: cargo make tests
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@@ -112,6 +115,33 @@ jobs:
|
|||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
- run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings
|
- run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
|
# Only run semver checks if the PR is not a draft and does not have the breaking label
|
||||||
|
# Breaking PRs don't need to follow semver since they are breaking changes
|
||||||
|
# However, this means we won't attempt to backport them, so you should be careful about using this label, as it will
|
||||||
|
# likely make future backporting difficult
|
||||||
|
#
|
||||||
|
# todo: fix this so even if breaking changes have been merged, the fix can be backported
|
||||||
|
#
|
||||||
|
# This will stop working once the first breaking change has been merged, so we should really try to just backport the fix
|
||||||
|
# and *then* run the semver checks. Basically "would backporting this PR cause a breaking change on stable?"
|
||||||
|
#
|
||||||
|
# semver:
|
||||||
|
# if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'breaking')
|
||||||
|
# name: Semver Check
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v4
|
||||||
|
# - uses: dtolnay/rust-toolchain@stable
|
||||||
|
# - uses: Swatinem/rust-cache@v2
|
||||||
|
# with:
|
||||||
|
# cache-all-crates: "true"
|
||||||
|
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
# - name: Check semver
|
||||||
|
# uses: obi1kenobi/cargo-semver-checks-action@v2
|
||||||
|
# with:
|
||||||
|
# manifest-path: ./Cargo.toml
|
||||||
|
# exclude: "dioxus-cli, dioxus-ext"
|
||||||
|
|
||||||
playwright:
|
playwright:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
name: Playwright Tests
|
name: Playwright Tests
|
||||||
@@ -235,24 +265,3 @@ jobs:
|
|||||||
- name: test
|
- name: test
|
||||||
run: |
|
run: |
|
||||||
${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }}
|
${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }}
|
||||||
|
|
||||||
# Coverage is disabled until we can fix it
|
|
||||||
# coverage:
|
|
||||||
# name: Coverage
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# container:
|
|
||||||
# image: xd009642/tarpaulin:develop-nightly
|
|
||||||
# options: --security-opt seccomp=unconfined
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout repository
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
# - name: Generate code coverage
|
|
||||||
# run: |
|
|
||||||
# apt-get update &&\
|
|
||||||
# apt-get install build-essential &&\
|
|
||||||
# apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev -y &&\
|
|
||||||
# cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
|
|
||||||
# - name: Upload to codecov.io
|
|
||||||
# uses: codecov/codecov-action@v2
|
|
||||||
# with:
|
|
||||||
# fail_ci_if_error: false
|
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
# Runs whenever a PR is merged:
|
||||||
|
# - attempt to backports fixes
|
||||||
|
# - upload nightly docs
|
||||||
|
#
|
||||||
|
# Future:
|
||||||
|
# - upload nightly CLI builds
|
||||||
|
# - upload nightly vscode extension
|
||||||
|
# - upload benchmarks
|
||||||
|
# - compute coverge
|
||||||
|
#
|
||||||
|
# Note that direct commits to master circumvent this workflow!
|
||||||
|
|
||||||
|
name: Backport merged pull request
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types: [closed]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write # so it can comment
|
||||||
|
pull-requests: write # so it can create pull requests
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Attempt to backport a merged pull request to the latest stable release
|
||||||
|
backport:
|
||||||
|
name: Backport pull request
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Don't run on closed unmerged pull requests, or pull requests with the "breaking" label
|
||||||
|
if: github.event.pull_request.merged && !contains(github.event.pull_request.labels.*.name, 'breaking')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Create backport pull requests
|
||||||
|
uses: korthout/backport-action@v2
|
||||||
|
|
||||||
|
# Upload nightly docs to the website
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: sudo apt-get update
|
||||||
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
||||||
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
|
with:
|
||||||
|
toolchain: nightly-2024-02-01
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
cache-all-crates: "true"
|
||||||
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
- uses: ilammy/setup-nasm@v1
|
||||||
|
|
||||||
|
- name: cargo doc
|
||||||
|
run: cargo doc --no-deps --workspace --all-features
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
||||||
|
with:
|
||||||
|
branch: gh-pages
|
||||||
|
folder: target/doc
|
||||||
|
target-folder: api-docs/nightly
|
||||||
|
repository-name: dioxuslabs/docsite
|
||||||
|
clean: false
|
||||||
|
token: ${{ secrets.DEPLOY_KEY }}
|
||||||
|
|
||||||
|
# Attempt to backport a merged pull request to the latest stable release
|
||||||
|
#
|
||||||
|
# If the backported PR is succesfully merged
|
||||||
|
# Any PR without the "breaking" label will be attempted to be backported to the latest stable release
|
||||||
|
|
||||||
|
# Coverage is disabled until we can fix it
|
||||||
|
# coverage:
|
||||||
|
# name: Coverage
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# container:
|
||||||
|
# image: xd009642/tarpaulin:develop-nightly
|
||||||
|
# options: --security-opt seccomp=unconfined
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout repository
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
# - name: Generate code coverage
|
||||||
|
# run: |
|
||||||
|
# apt-get update &&\
|
||||||
|
# apt-get install build-essential &&\
|
||||||
|
# apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev -y &&\
|
||||||
|
# cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
|
||||||
|
# - name: Upload to codecov.io
|
||||||
|
# uses: codecov/codecov-action@v2
|
||||||
|
# with:
|
||||||
|
# fail_ci_if_error: false
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# Create a PR that promotes the current main pre-release to the next stable release
|
||||||
|
#
|
||||||
|
# IE if the current master version is 0.4.0-rc.7, this will create a PR to promote it to 0.4.0
|
||||||
|
#
|
||||||
|
# - update the version in the Cargo.toml to v0.4.0
|
||||||
|
# - generate a v0.4 branch
|
||||||
|
# - push the branch to the repository
|
||||||
|
# - then bump 0.4.0-rc.1 to 0.5.0-rc.0
|
||||||
|
#
|
||||||
|
# This means main will never be a "stable" release, and we can always merge breaking changes to main
|
||||||
|
# and backport them to the latest stable release
|
||||||
|
#
|
||||||
|
# This is configured to be ran manually, but could honestly just be a release workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
promote:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Publish the next pre-release
|
||||||
|
run: |
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
# go from eg 0.4.0-rc.7 to 0.4.0, committing the change
|
||||||
|
cargo workspaces version -y minor
|
||||||
|
|
||||||
|
# create a new branch for the release
|
||||||
|
RELEASE_BRANCH=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
|
||||||
|
RELEASE_BRANCH=v$(echo $RELEASE_BRANCH | sed 's/\.[0-9]*$//')
|
||||||
|
git branch $RELEASE_BRANCH
|
||||||
|
|
||||||
|
# go from 0.4.0 to 0.5.0-rc.0
|
||||||
|
cargo workspaces version -y preminor --pre-id rc
|
||||||
|
|
||||||
|
# push the new branch to the repository
|
||||||
|
git push origin $RELEASE_BRANCH
|
||||||
|
|
||||||
|
# push the new version to the repository
|
||||||
|
git push origin main
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
# Release workflow
|
||||||
|
#
|
||||||
|
# We parallelize builds, dump all the artifacts into a release, and then publish the release
|
||||||
|
# This guarantees everything is properly built and cached in case anything goes wrong
|
||||||
|
#
|
||||||
|
# The artifacts also need to get pushed to the various places
|
||||||
|
# - the CLI goes to the releases page for binstall
|
||||||
|
# - the extension goes to the marketplace
|
||||||
|
# - the docs go to the website
|
||||||
|
#
|
||||||
|
# We need to be aware of the channel we're releasing
|
||||||
|
# - prerelease is master
|
||||||
|
# - stable is whatever the latest stable release is (ie 0.4 or 0.5 or 0.6 etc)
|
||||||
|
#
|
||||||
|
# It's intended that this workflow is run manually, and only when we're ready to release
|
||||||
|
|
||||||
|
name: Publish
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
channel:
|
||||||
|
type: choice
|
||||||
|
name: "Branch to publish"
|
||||||
|
required: true
|
||||||
|
description: Choose the branch to publish.
|
||||||
|
options:
|
||||||
|
- main
|
||||||
|
- v0.4
|
||||||
|
- v0.5
|
||||||
|
- v0.6
|
||||||
|
|
||||||
|
env:
|
||||||
|
# make sure we have the right version
|
||||||
|
# main is always a prepatch until we hit 1.0, and then this script needs to be updated
|
||||||
|
# note that we need to promote the prepatch to a minor bump when we actually do a release
|
||||||
|
# this means the version in git will always be one minor bump ahead of the actual release - basically meaning once
|
||||||
|
# we release a version, it's fair game to merge breaking changes to main since all semver-compatible changes will be
|
||||||
|
# backported automatically
|
||||||
|
SEMVER: ${{ github.event.inputs.channel == 'main' && 'prerelease' || 'patch' }}
|
||||||
|
PRERELEASE_TAG: ${{ github.event.inputs.channel == 'main' && '-pre' || '' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# First, run checks (clippy, tests, etc) and then publish the crates to crates.io
|
||||||
|
release-crates:
|
||||||
|
steps:
|
||||||
|
# Checkout the right branch, and the nightly stuff
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
ref: ${{ github.event.inputs.channel }}
|
||||||
|
- run: sudo apt-get update
|
||||||
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
||||||
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
|
with:
|
||||||
|
toolchain: nightly-2024-02-01
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
cache-all-crates: "true"
|
||||||
|
- uses: ilammy/setup-nasm@v1
|
||||||
|
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@v1.3.1
|
||||||
|
with: # speed things up a bit
|
||||||
|
large-packages: false
|
||||||
|
docker-images: false
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
|
# Just make sure clippy is happy before doing anything else
|
||||||
|
# Don't publish versions with clippy errors!
|
||||||
|
- name: Clippy
|
||||||
|
run: cargo clippy --workspace --all --examples --tests --all-features --all-targets -- -D warnings
|
||||||
|
|
||||||
|
# Build the docs here too before publishing, to ensure they're up to date
|
||||||
|
- name: cargo doc
|
||||||
|
run: RUSTDOCFLAGS="--cfg docsrs" cargo doc --no-deps --workspace --all-features
|
||||||
|
|
||||||
|
- name: Publish to crates.io
|
||||||
|
run: |
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
cargo workspaces version -y ${{ env.SEMVER }} --pre-id rc --no-git-commit
|
||||||
|
|
||||||
|
# todo: actually just publish!
|
||||||
|
# cargo workspaces publish -y ${{ github.event.inputs.semver }}
|
||||||
|
|
||||||
|
# this will be more useful when we publish the website with updated docs
|
||||||
|
# Build the docs.rs docs and publish them to the website under the right folder
|
||||||
|
# v0.4.x -> docs/0.4
|
||||||
|
# v0.5.x -> docs/0.5 etc
|
||||||
|
# main -> docs/nightly
|
||||||
|
# strip the v from the channel, and the .x from the end, and replace main with nightly
|
||||||
|
# - name: determine docs folder by channel
|
||||||
|
# id: determine_docs_folder
|
||||||
|
# run: echo "::set-output name=folder::$(echo ${{ github.event.inputs.channel }} | sed 's/v//g' | sed 's/\.x//g' | sed 's/main/nightly/g')"
|
||||||
|
|
||||||
|
# Build the CLI for all platforms, uploading the artifacts to our releases page
|
||||||
|
release-cli:
|
||||||
|
needs: release-crates
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- target: x86_64-pc-windows-msvc
|
||||||
|
os: windows-latest
|
||||||
|
- target: aaarch64-pc-windows-msvc
|
||||||
|
os: windows-latest
|
||||||
|
- target: x86_64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
- target: aarch64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
- target: x86_64-unknown-linux-gnu
|
||||||
|
os: ubuntu-latest
|
||||||
|
- target: aarch64-unknown-linux-gnu
|
||||||
|
os: ubuntu-latest
|
||||||
|
runs-on: ${{ matrix.platform.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
ref: ${{ github.event.inputs.channel }}
|
||||||
|
|
||||||
|
- name: Install stable
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: "1.70.0"
|
||||||
|
targets: ${{ matrix.platform.target }}
|
||||||
|
|
||||||
|
- uses: ilammy/setup-nasm@v1
|
||||||
|
|
||||||
|
- name: Setup cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: packages/cli -> ../../target
|
||||||
|
|
||||||
|
- name: Free Disk Space
|
||||||
|
uses: jlumbroso/free-disk-space@v1.3.1
|
||||||
|
with: # speed things up a bit
|
||||||
|
large-packages: false
|
||||||
|
docker-images: false
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
|
# Todo: we want `cargo install dx` to actually just use a prebuilt binary instead of building it
|
||||||
|
- 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-${{ matrix.platform.target }}${{ env.PRERELEASE_TAG }}
|
||||||
|
checksum: sha256
|
||||||
|
manifest_path: packages/cli/Cargo.toml
|
||||||
|
|
||||||
|
# todo: these things
|
||||||
|
# Run benchmarks, which we'll use to display on the website
|
||||||
|
# release-benchmarks:
|
||||||
|
# Build the vscode extension, uploading the artifact to the marketplace
|
||||||
|
# release-extension:
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
name: Clear cache
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
clear-cache:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Clear cache
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.cache_controller }}
|
|
||||||
script: |
|
|
||||||
console.log("About to clear")
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
const caches = await github.rest.actions.getActionsCacheList({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo
|
|
||||||
})
|
|
||||||
if (caches.data.actions_caches.length === 0) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
for (const cache of caches.data.actions_caches) {
|
|
||||||
console.log(cache)
|
|
||||||
github.rest.actions.deleteActionsCacheById({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
cache_id: cache.id,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log("Clear completed")
|
|
||||||
Generated
+184
-190
File diff suppressed because it is too large.
Load diff
+6
-5
@@ -79,12 +79,13 @@ plasmo = { path = "packages/plasmo", version = "0.4.0" }
|
|||||||
dioxus-native-core = { path = "packages/native-core", version = "0.4.0" }
|
dioxus-native-core = { path = "packages/native-core", version = "0.4.0" }
|
||||||
dioxus-native-core-macro = { path = "packages/native-core-macro", version = "0.4.0" }
|
dioxus-native-core-macro = { path = "packages/native-core-macro", version = "0.4.0" }
|
||||||
rsx-rosetta = { path = "packages/rsx-rosetta", version = "0.4.0" }
|
rsx-rosetta = { path = "packages/rsx-rosetta", version = "0.4.0" }
|
||||||
dioxus-signals = { path = "packages/signals" }
|
dioxus-signals = { path = "packages/signals", version = "0.4.0" }
|
||||||
dioxus-cli-config = { path = "packages/cli-config", version = "0.4.1" }
|
dioxus-cli-config = { path = "packages/cli-config", version = "0.4.1" }
|
||||||
generational-box = { path = "packages/generational-box", version = "0.4.3" }
|
generational-box = { path = "packages/generational-box", version = "0.4.3" }
|
||||||
dioxus-hot-reload = { path = "packages/hot-reload", version = "0.4.0" }
|
dioxus-hot-reload = { path = "packages/hot-reload", version = "0.4.0" }
|
||||||
dioxus-fullstack = { path = "packages/fullstack", version = "0.4.1" }
|
dioxus-fullstack = { path = "packages/fullstack", version = "0.4.1" }
|
||||||
dioxus_server_macro = { path = "packages/server-macro", version = "0.4.1" }
|
dioxus_server_macro = { path = "packages/server-macro", version = "0.4.1", default-features = false}
|
||||||
|
dioxus-ext = { path = "packages/extension", version = "0.4.0" }
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
tracing-futures = "0.2.5"
|
tracing-futures = "0.2.5"
|
||||||
toml = "0.8"
|
toml = "0.8"
|
||||||
@@ -99,16 +100,16 @@ thiserror = "1.0.40"
|
|||||||
prettyplease = { package = "prettier-please", version = "0.2", features = [
|
prettyplease = { package = "prettier-please", version = "0.2", features = [
|
||||||
"verbatim",
|
"verbatim",
|
||||||
] }
|
] }
|
||||||
manganis-cli-support = { git = "https://github.com/DioxusLabs/collect-assets", rev = "f982698", features = [
|
manganis-cli-support = { version = "0.1.0", features = [
|
||||||
"webp",
|
"webp",
|
||||||
"html",
|
"html",
|
||||||
] }
|
] }
|
||||||
manganis = { git = "https://github.com/DioxusLabs/collect-assets", rev = "f982698" }
|
manganis = { version = "0.1.0" }
|
||||||
|
|
||||||
lru = "0.12.2"
|
lru = "0.12.2"
|
||||||
async-trait = "0.1.77"
|
async-trait = "0.1.77"
|
||||||
axum = "0.7.0"
|
axum = "0.7.0"
|
||||||
axum-server = "0.6.0"
|
axum-server = {version = "0.6.0", default-features = false}
|
||||||
tower = "0.4.13"
|
tower = "0.4.13"
|
||||||
http = "1.0.0"
|
http = "1.0.0"
|
||||||
tower-http = "0.5.1"
|
tower-http = "0.5.1"
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ publish = false
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
dioxus = { path = "../../packages/dioxus", version = "*" }
|
dioxus = { workspace = true }
|
||||||
dioxus-web = { path = "../../packages/web", version = "*" }
|
dioxus-web = { workspace = true }
|
||||||
|
|
||||||
log = "0.4.6"
|
log = "0.4.6"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
dist
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "dioxus-cli-config"
|
name = "dioxus-cli-config"
|
||||||
version = "0.4.1"
|
version = { workspace = true }
|
||||||
authors = ["Jonathan Kelley"]
|
authors = ["Jonathan Kelley"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Configuration for the Dioxus CLI"
|
description = "Configuration for the Dioxus CLI"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "dioxus-cli"
|
name = "dioxus-cli"
|
||||||
version = "0.4.3"
|
version = { workspace = true }
|
||||||
authors = ["Jonathan Kelley"]
|
authors = ["Jonathan Kelley"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "CLI tool for developing, testing, and publishing Dioxus apps"
|
description = "CLI tool for developing, testing, and publishing Dioxus apps"
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ pub(crate) fn check_app_exits(app: fn() -> Element) {
|
|||||||
let should_panic = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true));
|
let should_panic = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true));
|
||||||
let should_panic_clone = should_panic.clone();
|
let should_panic_clone = should_panic.clone();
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
std::thread::sleep(std::time::Duration::from_secs(30));
|
std::thread::sleep(std::time::Duration::from_secs(60));
|
||||||
if should_panic_clone.load(std::sync::atomic::Ordering::SeqCst) {
|
if should_panic_clone.load(std::sync::atomic::Ordering::SeqCst) {
|
||||||
|
eprintln!("App did not exit in time");
|
||||||
std::process::exit(exitcode::SOFTWARE);
|
std::process::exit(exitcode::SOFTWARE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -31,7 +32,7 @@ pub(crate) fn check_app_exits(app: fn() -> Element) {
|
|||||||
fn mock_event(id: &'static str, value: &'static str) {
|
fn mock_event(id: &'static str, value: &'static str) {
|
||||||
use_hook(move || {
|
use_hook(move || {
|
||||||
spawn(async move {
|
spawn(async move {
|
||||||
tokio::time::sleep(std::time::Duration::from_millis(2000)).await;
|
tokio::time::sleep(std::time::Duration::from_millis(5000)).await;
|
||||||
|
|
||||||
let js = format!(
|
let js = format!(
|
||||||
r#"
|
r#"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "dioxus-ext"
|
name = "dioxus-ext"
|
||||||
version = "0.1.0"
|
version = { workspace = true }
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
@@ -12,6 +12,5 @@ dioxus-autofmt = { workspace = true }
|
|||||||
rsx-rosetta = { workspace = true }
|
rsx-rosetta = { workspace = true }
|
||||||
html_parser = { workspace = true }
|
html_parser = { workspace = true }
|
||||||
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "rlib"]
|
crate-type = ["cdylib", "rlib"]
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
"name": "dioxus",
|
"name": "dioxus",
|
||||||
"displayName": "Dioxus",
|
"displayName": "Dioxus",
|
||||||
"description": "Useful tools for working with Dioxus",
|
"description": "Useful tools for working with Dioxus",
|
||||||
"version": "0.0.2",
|
"version": "0.4.0",
|
||||||
"publisher": "DioxusLabs",
|
"publisher": "DioxusLabs",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"icon": "static/icon.png",
|
"icon": "static/icon.png",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/DioxusLabs/cli"
|
"url": "https://github.com/DioxusLabs/dioxus"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.68.1"
|
"vscode": "^1.68.1"
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ resolver = "2"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# server functions
|
# server functions
|
||||||
server_fn = { version = "0.6.5", features = ["json", "url", "browser"], default-features = false }
|
server_fn = { version = "0.6.5", features = ["json", "url", "browser"], default-features = false }
|
||||||
dioxus_server_macro = { workspace = true, version = "0.6.5", default-features = false }
|
dioxus_server_macro = { workspace = true }
|
||||||
|
|
||||||
# axum
|
# axum
|
||||||
axum = { workspace = true, features = ["ws", "macros"], default-features = false, optional = true }
|
axum = { workspace = true, features = ["ws", "macros"], optional = true }
|
||||||
tower-http = { workspace = true, optional = true, features = ["fs", "compression-gzip"] }
|
tower-http = { workspace = true, optional = true, features = ["fs", "compression-gzip"] }
|
||||||
|
|
||||||
dioxus-lib = { workspace = true }
|
dioxus-lib = { workspace = true }
|
||||||
@@ -44,7 +44,7 @@ anymap = { version = "0.12.1", optional = true }
|
|||||||
serde = "1.0.159"
|
serde = "1.0.159"
|
||||||
serde_json = { version = "1.0.95", optional = true }
|
serde_json = { version = "1.0.95", optional = true }
|
||||||
tokio-stream = { version = "0.1.12", features = ["sync"], optional = true }
|
tokio-stream = { version = "0.1.12", features = ["sync"], optional = true }
|
||||||
futures-util = { workspace = true, default-features = false }
|
futures-util = { workspace = true }
|
||||||
ciborium = "0.2.1"
|
ciborium = "0.2.1"
|
||||||
base64 = "0.21.0"
|
base64 = "0.21.0"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "generational-box"
|
name = "generational-box"
|
||||||
authors = ["Evan Almloff"]
|
authors = ["Evan Almloff"]
|
||||||
version = "0.4.3"
|
version = { workspace = true }
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A box backed by a generational runtime"
|
description = "A box backed by a generational runtime"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "dioxus-signals"
|
name = "dioxus-signals"
|
||||||
authors = ["Jonathan Kelley"]
|
authors = ["Jonathan Kelley", "Evan Almloff"]
|
||||||
version = "0.4.3"
|
version = { workspace = true }
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Signals for Dioxus"
|
description = "Signals for Dioxus"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ tracing = { workspace = true }
|
|||||||
http = { workspace = true }
|
http = { workspace = true }
|
||||||
async-trait = { workspace = true }
|
async-trait = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
chrono = { verison = "0.4.34", optional = true }
|
chrono = { version = "0.4.34", optional = true }
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
tokio = { version = "1.28", features = ["io-util"], optional = true }
|
tokio = { version = "1.28", features = ["io-util"], optional = true }
|
||||||
|
|||||||
Reference in new issue
Block a user