Skip to content

Commit 895fc9a

Browse files
committed
fix(ci): remove torii and katana from release and add dojoup
1 parent c806207 commit 895fc9a

File tree

3 files changed

+13
-32
lines changed

3 files changed

+13
-32
lines changed

.github/workflows/release-dispatch.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,12 @@ jobs:
2525
VERSION=${{ inputs.version }}
2626
VERSION=${VERSION#v}
2727
cargo release version $VERSION --execute --no-confirm && cargo release replace --execute --no-confirm
28-
- id: version_info
29-
run: |
30-
cargo install cargo-get
31-
echo "version=$(cargo get workspace.package.version)" >> $GITHUB_OUTPUT
3228
- uses: peter-evans/create-pull-request@v5
3329
with:
3430
# We have to use a PAT in order to trigger ci
3531
token: ${{ secrets.CREATE_PR_TOKEN }}
36-
title: "Prepare release: v${{ steps.version_info.outputs.version }}"
37-
commit-message: "Prepare release: v${{ steps.version_info.outputs.version }}"
32+
title: "release(prepare): v${VERSION}"
33+
commit-message: "Prepare release: v${VERSION}"
3834
branch: prepare-release
3935
base: main
4036
delete-branch: true

.github/workflows/release.yml

+5-25
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: release
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
preview:
7-
description: 'Preview tag if not empty. Needs to be in format vX.Y.Z-preview.X'
8-
type: string
95
pull_request:
106
types: [closed]
117
branches:
@@ -27,17 +23,8 @@ jobs:
2723
- name: Get version
2824
id: release_info
2925
run: |
30-
if [[ "${{ github.event.inputs.preview || 'false' }}" != "false" ]]; then
31-
# check if valid
32-
if [[ ! "${{ github.event.inputs.preview }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-preview\.[0-9]+$ ]]; then
33-
echo "Invalid preview tag format. Needs to be in format vX.Y.Z-preview.X"
34-
exit 1
35-
fi
36-
echo "tag_name=${{ github.event.inputs.preview }}" >> $GITHUB_OUTPUT
37-
else
38-
cargo install cargo-get
39-
echo "tag_name=v$(cargo get workspace.package.version)" >> $GITHUB_OUTPUT
40-
fi
26+
cargo install cargo-get
27+
echo "tag_name=v$(cargo get workspace.package.version)" >> $GITHUB_OUTPUT
4128
4229
release:
4330
name: ${{ matrix.job.target }} (${{ matrix.job.os }})
@@ -90,11 +77,6 @@ jobs:
9077
with:
9178
cache-on-failure: true
9279

93-
# Required to build Katana at the moment.
94-
- uses: oven-sh/setup-bun@v1
95-
with:
96-
bun-version: latest
97-
9880
# required for `aws-lc-rs` crate to compile on Windows; https://aws.github.io/aws-lc-rs/requirements/windows.html
9981
- name: Install NASM
10082
uses: ilammy/setup-nasm@v1
@@ -130,16 +112,16 @@ jobs:
130112
VERSION_NAME: ${{ needs.prepare.outputs.tag_name }}
131113
run: |
132114
if [ "$PLATFORM_NAME" == "linux" ]; then
133-
tar -czvf "dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release katana sozo torii dojo-language-server
115+
tar -czvf "dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release sozo dojo-language-server
134116
echo "file_name=dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
135117
elif [ "$PLATFORM_NAME" == "darwin" ]; then
136118
# We need to use gtar here otherwise the archive is corrupt.
137119
# See: https://github.com/actions/virtual-environments/issues/2619
138-
gtar -czvf "dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release katana sozo torii dojo-language-server
120+
gtar -czvf "dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release sozo dojo-language-server
139121
echo "file_name=dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" >> $GITHUB_OUTPUT
140122
else
141123
cd ./target/${TARGET}/release
142-
7z a -tzip "dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" katana.exe sozo.exe torii.exe dojo-language-server.exe
124+
7z a -tzip "dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" sozo.exe dojo-language-server.exe
143125
mv "dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" ../../../
144126
echo "file_name=dojo_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.zip" >> $GITHUB_OUTPUT
145127
fi
@@ -150,9 +132,7 @@ jobs:
150132
if: ${{ env.PLATFORM_NAME == 'linux' }}
151133
run: |
152134
mkdir -p $PLATFORM_NAME/$ARCH
153-
mv target/$TARGET/release/katana $PLATFORM_NAME/$ARCH
154135
mv target/$TARGET/release/sozo $PLATFORM_NAME/$ARCH
155-
mv target/$TARGET/release/torii $PLATFORM_NAME/$ARCH
156136
shell: bash
157137

158138
# Upload these for use with the Docker build later

Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ LABEL description="Dojo is a provable game engine and toolchain for building onc
3131
source="https://github.com/dojoengine/dojo" \
3232
documentation="https://book.dojoengine.org/"
3333

34-
COPY --from=artifacts --chmod=755 $TARGETPLATFORM/katana $TARGETPLATFORM/sozo $TARGETPLATFORM/torii /usr/local/bin/
34+
COPY --from=artifacts --chmod=755 $TARGETPLATFORM/sozo /usr/local/bin/
35+
36+
# We may not want to install sozo via dojoup though, only Katana and Torii?
37+
# Or we can let the use decide.
38+
COPY dojoup/dojoup /usr/local/bin/dojoup
39+
# RUN dojoup -v $DOJO_VERSION
3540

3641
COPY --from=builder /usr/local/bin/curtail /usr/local/bin/curtail

0 commit comments

Comments
 (0)