Skip to content

Commit

Permalink
feat: rename the repository to shiroa (for publish) (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin authored Jun 14, 2024
1 parent 950dcd7 commit af46f0d
Show file tree
Hide file tree
Showing 37 changed files with 377 additions and 366 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: typst_book::ci
name: shiroa::ci
on: [push, pull_request]

env:
Expand Down Expand Up @@ -27,6 +27,6 @@ jobs:
cargo build --release --workspace
- name: Build Book
run: |
cargo run --release --bin typst-book -- build --path-to-root /typst-book/ -w . github-pages/docs
cargo run --release --bin shiroa -- build --path-to-root /shiroa/ -w . github-pages/docs
- name: Test
run: cargo test --workspace --no-fail-fast
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: typst_book::release::docker
name: shiroa::release::docker
on:
release:
types: [created]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Download font assets
run: |
mkdir -p assets/fonts
curl -L https://github.com/Myriad-Dreamin/typst-book/releases/download/v0.1.0/charter-font-assets.tar.gz | tar -xvz -C assets/fonts
curl -L https://github.com/Myriad-Dreamin/shiroa/releases/download/v0.1.0/charter-font-assets.tar.gz | tar -xvz -C assets/fonts
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Set Node.js 18.x
Expand All @@ -45,7 +45,7 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Build Book
run: |
cargo run --release --bin typst-book -- build --font-path assets/fonts --path-to-root /typst-book/ -w . github-pages/docs
cargo run --release --bin shiroa -- build --font-path assets/fonts --path-to-root /shiroa/ -w . github-pages/docs
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_pr_title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: typst_book::lint_pr_title
name: shiroa::lint_pr_title
on:
pull_request:
types: [opened, edited, synchronize]
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: typst_book::release
name: shiroa::release
on:
release:
types: [created]
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-dist
name: shiroa-dist
path: frontend/dist
if-no-files-found: error

Expand Down Expand Up @@ -118,17 +118,17 @@ jobs:
- name: Run Native Build
shell: pwsh
run: |
cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin typst-book
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin typst-book
cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin shiroa
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin shiroa
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/typst-book*
name: shiroa-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/typst-book*
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/shiroa*
if-no-files-found: error

build_linux_riscv64:
Expand Down Expand Up @@ -157,30 +157,30 @@ jobs:
target: ${{ matrix.rust-target }}
- name: Build cross image
run: |
docker build -t typst-book/riscv64 ${GITHUB_WORKSPACE}/.github/cross-linux-riscv64/
docker build -t shiroa/riscv64 ${GITHUB_WORKSPACE}/.github/cross-linux-riscv64/
env:
CROSS_DOCKER_IN_DOCKER: true
- name: Run Cross Build
run: |
mkdir -p frontend/node_modules
cp -r artifacts/typst-ts-dist frontend/node_modules/@myriaddreamin
cp -r artifacts/typst-book-dist frontend/dist
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project typst-book/riscv64:latest cargo build --manifest-path cli/Cargo.toml --release --target ${CARGO_TARGET} --bin typst-book
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project typst-book/riscv64:latest cargo build --manifest-path cli/Cargo.toml --profile release-stripped --target ${CARGO_TARGET} --bin typst-book
cp -r artifacts/shiroa-dist frontend/dist
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project shiroa/riscv64:latest cargo build --manifest-path cli/Cargo.toml --release --target ${CARGO_TARGET} --bin shiroa
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project shiroa/riscv64:latest cargo build --manifest-path cli/Cargo.toml --profile release-stripped --target ${CARGO_TARGET} --bin shiroa
env:
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: ${{ matrix.rust-target }}
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/typst-book*
name: shiroa-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/typst-book*
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/shiroa*
if-no-files-found: error

build_alpine:
Expand Down Expand Up @@ -220,17 +220,17 @@ jobs:
dir: 'frontend'
- name: build binaries
run: |
cargo build --release --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin typst-book
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin typst-book
cargo build --release --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin shiroa
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin shiroa
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}
path: target/${{ env.RUST_TARGET }}/release-stripped/typst-book*
name: shiroa-${{ env.target }}
path: target/${{ env.RUST_TARGET }}/release-stripped/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}-relwithdebuginfo
path: target/${{ env.RUST_TARGET }}/release/typst-book*
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ env.RUST_TARGET }}/release/shiroa*
if-no-files-found: error

release:
Expand All @@ -253,32 +253,32 @@ jobs:
mkdir -p gh-release/
pack_release() {
target=$2
src=typst-book-$1
name=typst-book-$target
src=shiroa-$1
name=shiroa-$target
mkdir -p tmp/$name
rm -f artifacts/$src/*.d
rm -f artifacts/$src/*.pdb
mkdir -p release/$name/bin
cp artifacts/$src-relwithdebuginfo/typst-book* "release/$name/bin/"
cp artifacts/$src-relwithdebuginfo/shiroa* "release/$name/bin/"
cp -r CHANGELOG release/$name/
cp -r github-pages/docs release/$name/
cp README.md \
LICENSE \
CHANGELOG.md \
release/$name/
chmod +x release/$name/bin/typst-book*
chmod +x release/$name/bin/shiroa*
tar czvf gh-release/$name-relwithdebuginfo.tar.gz -C release $name
mkdir -p release-stripped/$name/bin
cp artifacts/$src/typst-book* "release-stripped/$name/bin/"
cp artifacts/$src/shiroa* "release-stripped/$name/bin/"
cp -r CHANGELOG release-stripped/$name/
cp -r github-pages/docs release-stripped/$name/
cp README.md \
LICENSE \
CHANGELOG.md \
release-stripped/$name/
chmod +x release-stripped/$name/bin/typst-book*
chmod +x release-stripped/$name/bin/shiroa*
tar czvf gh-release/$name.tar.gz -C release-stripped $name
}
pack_release win32-x64 x86_64-pc-windows-msvc
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/release_with_artifact.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: typst_book::release_with_artifact
name: shiroa::release_with_artifact
on:
workflow_dispatch:

Expand Down Expand Up @@ -73,17 +73,17 @@ jobs:
- name: Run Native Build
shell: pwsh
run: |
cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin typst-book
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin typst-book
cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin shiroa
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin shiroa
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/typst-book*
name: shiroa-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/typst-book*
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/shiroa*
if-no-files-found: error

build_linux_riscv64:
Expand Down Expand Up @@ -111,28 +111,28 @@ jobs:
target: ${{ matrix.rust-target }}
- name: Build cross image
run: |
docker build -t typst-book/riscv64 ${GITHUB_WORKSPACE}/.github/cross-linux-riscv64/
docker build -t shiroa/riscv64 ${GITHUB_WORKSPACE}/.github/cross-linux-riscv64/
env:
CROSS_DOCKER_IN_DOCKER: true
- name: Run Cross Build
run: |
mkdir -p frontend/node_modules
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project typst-book/riscv64:latest cargo build --manifest-path cli/Cargo.toml --release --target ${CARGO_TARGET} --bin typst-book
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project typst-book/riscv64:latest cargo build --manifest-path cli/Cargo.toml --profile release-stripped --target ${CARGO_TARGET} --bin typst-book
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project shiroa/riscv64:latest cargo build --manifest-path cli/Cargo.toml --release --target ${CARGO_TARGET} --bin shiroa
docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project shiroa/riscv64:latest cargo build --manifest-path cli/Cargo.toml --profile release-stripped --target ${CARGO_TARGET} --bin shiroa
env:
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: ${{ matrix.rust-target }}
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/typst-book*
name: shiroa-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/typst-book*
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/shiroa*
if-no-files-found: error

build_alpine:
Expand Down Expand Up @@ -160,22 +160,22 @@ jobs:
git config --global --add safe.directory $PWD
- name: build binaries
run: |
cargo build --release --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin typst-book
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin typst-book
cargo build --release --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin shiroa
cargo build --profile release-stripped --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin shiroa
- uses: actions/upload-artifact@v3
with:
name: typst-book-font-assets
name: shiroa-font-assets
path: assets
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}
path: target/${{ env.RUST_TARGET }}/release-stripped/typst-book*
name: shiroa-${{ env.target }}
path: target/${{ env.RUST_TARGET }}/release-stripped/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: typst-book-${{ env.target }}-relwithdebuginfo
path: target/${{ env.RUST_TARGET }}/release/typst-book*
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ env.RUST_TARGET }}/release/shiroa*
if-no-files-found: error

release:
Expand All @@ -198,32 +198,32 @@ jobs:
mkdir -p gh-release/
pack_release() {
target=$2
src=typst-book-$1
name=typst-book-$target
src=shiroa-$1
name=shiroa-$target
mkdir -p tmp/$name
rm -f artifacts/$src/*.d
rm -f artifacts/$src/*.pdb
mkdir -p release/$name/bin
cp artifacts/$src-relwithdebuginfo/typst-book* "release/$name/bin/"
cp artifacts/$src-relwithdebuginfo/shiroa* "release/$name/bin/"
cp -r CHANGELOG release/$name/
cp -r github-pages/docs release/$name/
cp README.md \
LICENSE \
CHANGELOG.md \
release/$name/
chmod +x release/$name/bin/typst-book*
chmod +x release/$name/bin/shiroa*
tar czvf gh-release/$name-relwithdebuginfo.tar.gz -C release $name
mkdir -p release-stripped/$name/bin
cp artifacts/$src/typst-book* "release-stripped/$name/bin/"
cp artifacts/$src/shiroa* "release-stripped/$name/bin/"
cp -r CHANGELOG release-stripped/$name/
cp -r github-pages/docs release-stripped/$name/
cp README.md \
LICENSE \
CHANGELOG.md \
release-stripped/$name/
chmod +x release-stripped/$name/bin/typst-book*
chmod +x release-stripped/$name/bin/shiroa*
tar czvf gh-release/$name.tar.gz -C release-stripped $name
}
pack_release win32-x64 x86_64-pc-windows-msvc
Expand All @@ -238,9 +238,9 @@ jobs:
pack_release alpine-x64 alpine-x64
pack_release alpine-x64 x86_64-unknown-linux-musl
# typst-book-font-assets
# shiroa-font-assets
mkdir -p release/font-assets
cp -r artifacts/typst-book-font-assets/* release/font-assets/
cp -r artifacts/shiroa-font-assets/* release/font-assets/
tar czvf gh-release/font-assets.tar.gz -C release font-assets
- name: Display structure of releasing files
run: find gh-release
Expand Down
Loading

0 comments on commit af46f0d

Please sign in to comment.