update the readme #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dioxus Fullstack App CI | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
frontend-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install cargo-binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: Install Dioxus CLI | |
run: cargo binstall dioxus-cli | |
- name: Build Dioxus frontend | |
run: dx bundle --release --package web | |
- name: rename binary | |
run: mv target/dx/web/release/web/server target/dx/web/release/web/pslink | |
- name: rename path | |
run: mv target/dx/web/release/web target/dx/web/release/pslink | |
- name: Create archive of build artifacts | |
run: tar -czvf pslink-linux-x86_64-bundle.tgz -C target/dx/web/release pslink | |
- name: Upload release artifacts | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: pslink-server-bundle.tgz | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload artifacts (for non-tagged builds) | |
uses: actions/upload-artifact@v4 | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: web-build | |
path: target/dx/web/release/pslink |