Skip to content

Commit

Permalink
Fix artifact path in release script
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Nov 27, 2023
1 parent e6a870f commit 2ad5f6f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ jobs:
platform: linux
target: x86_64-unknown-linux-gnu
arch: amd64
- os: ubuntu-latest-4-cores
- os: ubuntu-latest-8-cores
platform: linux
target: aarch64-unknown-linux-gnu
arch: arm64
svm_target_platform: linux-aarch64
- os: macos-latest
- os: macos-latest-xlarge
platform: darwin
target: x86_64-apple-darwin
arch: amd64
Expand Down Expand Up @@ -191,10 +191,10 @@ jobs:
body: ${{ needs.prepare.outputs.changelog }}
files: |
${{ steps.artifacts.outputs.file_name }}
# Upload these for use with the Docker build later
- name: Upload binaries
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: binaries
path: |
Expand Down Expand Up @@ -241,10 +241,10 @@ jobs:
uses: actions/checkout@v2

- name: Download binaries
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: binaries
path: target/
path: artifacts

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -259,12 +259,13 @@ jobs:
- name: Build and push docker image
uses: docker/build-push-action@v4
with:
no-cache: true
push: true
tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ needs.prepare.outputs.tag_name }}
platforms: linux/arm64
target: arm64
cache-from: type=gha
cache-to: type=gha,mode=max
# cache-from: type=gha
# cache-to: type=gha,mode=max

docker-build-and-push-linux-amd64:
name: Build and push linux-amd64 docker image
Expand All @@ -276,10 +277,10 @@ jobs:
uses: actions/checkout@v2

- name: Download binaries
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: binaries
path: target/
path: artifacts

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -294,9 +295,10 @@ jobs:
- name: Build and push docker image
uses: docker/build-push-action@v4
with:
no-cache: true
push: true
tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ needs.prepare.outputs.tag_name }}
platforms: linux/amd64
target: amd64
cache-from: type=gha
cache-to: type=gha,mode=max
# cache-from: type=gha
# cache-to: type=gha,mode=max
18 changes: 12 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ LABEL description="Dojo is a provable game engine and toolchain for building onc
documentation="https://book.dojoengine.org/"

FROM base as amd64
COPY target/x86_64-unknown-linux-gnu/release/katana /usr/local/bin/katana
COPY target/x86_64-unknown-linux-gnu/release/sozo /usr/local/bin/sozo
COPY target/x86_64-unknown-linux-gnu/release/torii /usr/local/bin/torii

RUN ls -R

COPY artifacts/x86_64-unknown-linux-gnu/release/katana /usr/local/bin/katana
COPY artifacts/x86_64-unknown-linux-gnu/release/sozo /usr/local/bin/sozo
COPY artifacts/x86_64-unknown-linux-gnu/release/torii /usr/local/bin/torii

FROM base as arm64
COPY target/aarch64-unknown-linux-gnu/release/katana /usr/local/bin/katana
COPY target/aarch64-unknown-linux-gnu/release/sozo /usr/local/bin/sozo
COPY target/aarch64-unknown-linux-gnu/release/torii /usr/local/bin/torii

RUN ls -R

COPY artifacts/aarch64-unknown-linux-gnu/release/katana /usr/local/bin/katana
COPY artifacts/aarch64-unknown-linux-gnu/release/sozo /usr/local/bin/sozo
COPY artifacts/aarch64-unknown-linux-gnu/release/torii /usr/local/bin/torii

0 comments on commit 2ad5f6f

Please sign in to comment.