Skip to content

Commit

Permalink
simplify build
Browse files Browse the repository at this point in the history
  • Loading branch information
lostbean committed Jul 8, 2024
1 parent d53726b commit 1bcd98c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ jobs:
- name: Magic cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Build Kardinal CLI images
- name: Build cli
run: |
nix build ./#cross-compiled-cli.x86_64-linux.${{ matrix.os }}.${{ matrix.arch }} --no-link --print-out-paths
path=$(nix build ./#cross-compiled-cli.x86_64-linux.${{ matrix.os }}.${{ matrix.arch }} --no-link --print-out-paths)
binout="/tmp/kardinal-${{ matrix.os }}-${{ matrix.arch }}"
mv $path $binout
ls -lah $binout
20 changes: 6 additions & 14 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,12 @@ jobs:
- name: Magic cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Build Kardinal CLI images
id: build-cli
shell: bash
run: |
path=$(nix build ./#cross-compiled-cli.x86_64-linux.${{ matrix.os }}.${{ matrix.arch }} --no-link --print-out-paths)
mv $path /tmp/kardinal-${{ matrix.os }}-${{ matrix.arch }}
echo "path=/tmp/kardinal-${{ matrix.os }}-${{ matrix.arch }}" >> $GITHUB_OUTPUT
- name: Access it
run: |
echo "the secret number is ${{ steps.build-cli.outputs.path }}"
- name: Upload Release Artifact
- name: Upload Release CLI Artifact
if: ${{ needs.release-please.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ steps.build-cli.outputs.path }}
run: |
path=$(nix build ./#cross-compiled-cli.x86_64-linux.${{ matrix.os }}.${{ matrix.arch }} --no-link --print-out-paths)
binout="/tmp/kardinal-${{ matrix.os }}-${{ matrix.arch }}"
mv $path $binout
gh release upload ${{ needs.release-please.outputs.tag_name }} $binout

0 comments on commit 1bcd98c

Please sign in to comment.