Skip to content

Commit

Permalink
dev: merge release with artifact and release
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Aug 27, 2024
1 parent dd0f67c commit 5d41bf4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 280 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ jobs:
shell: pwsh
run: |
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
cargo build --profile relwithdebinfo --manifest-path cli/Cargo.toml --target ${{ matrix.rust-target }} --bin shiroa
- uses: actions/upload-artifact@v3
with:
name: shiroa-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/shiroa*
path: target/${{ matrix.rust-target }}/release/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/shiroa*
path: target/${{ matrix.rust-target }}/relwithdebinfo/shiroa*
if-no-files-found: error

build_linux_riscv64:
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
cp -r artifacts/typst-ts-dist frontend/node_modules/@myriaddreamin
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
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 relwithdebinfo --target ${CARGO_TARGET} --bin shiroa
env:
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: ${{ matrix.rust-target }}
Expand All @@ -175,12 +175,12 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: shiroa-${{ env.target }}
path: target/${{ matrix.rust-target }}/release-stripped/shiroa*
path: target/${{ matrix.rust-target }}/release/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ matrix.rust-target }}/release/shiroa*
path: target/${{ matrix.rust-target }}/relwithdebinfo/shiroa*
if-no-files-found: error

build_alpine:
Expand Down Expand Up @@ -221,15 +221,15 @@ jobs:
- name: build binaries
run: |
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
cargo build --profile relwithdebuginfo --manifest-path cli/Cargo.toml --target $RUST_TARGET --bin shiroa
- uses: actions/upload-artifact@v3
with:
name: shiroa-${{ env.target }}
path: target/${{ env.RUST_TARGET }}/release-stripped/shiroa*
name: shiroa-${{ env.target }}-relwithdebuginfo
path: target/${{ env.RUST_TARGET }}/relwithdebuginfo/shiroa*
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: shiroa-${{ env.target }}-relwithdebuginfo
name: shiroa-${{ env.target }}
path: target/${{ env.RUST_TARGET }}/release/shiroa*
if-no-files-found: error

Expand Down Expand Up @@ -258,28 +258,28 @@ jobs:
mkdir -p tmp/$name
rm -f artifacts/$src/*.d
rm -f artifacts/$src/*.pdb
mkdir -p release/$name/bin
cp artifacts/$src-relwithdebuginfo/shiroa* "release/$name/bin/"
cp artifacts/$src/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/shiroa*
tar czvf gh-release/$name-relwithdebuginfo.tar.gz -C release $name
mkdir -p 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/
tar czvf gh-release/$name.tar.gz -C release $name
mkdir -p relwithdebinfo/$name/bin
cp artifacts/$src-relwithdebuginfo/shiroa* "relwithdebinfo/$name/bin/"
cp -r CHANGELOG relwithdebinfo/$name/
cp -r github-pages/docs relwithdebinfo/$name/
cp README.md \
LICENSE \
CHANGELOG.md \
release-stripped/$name/
chmod +x release-stripped/$name/bin/shiroa*
tar czvf gh-release/$name.tar.gz -C release-stripped $name
relwithdebinfo/$name/
chmod +x relwithdebinfo/$name/bin/shiroa*
tar czvf gh-release/$name-relwithdebuginfo.tar.gz -C relwithdebinfo $name
}
pack_release win32-x64 x86_64-pc-windows-msvc
pack_release win32-ia32 i686-pc-windows-msvc
Expand Down
259 changes: 0 additions & 259 deletions .github/workflows/release_with_artifact.yaml

This file was deleted.

0 comments on commit 5d41bf4

Please sign in to comment.