Skip to content

Commit

Permalink
build: test
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickDinh committed Mar 25, 2024
1 parent 23291da commit bd980a9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
17 changes: 8 additions & 9 deletions .github/actions/build-linux/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,25 @@ runs:

# - name: move binary to target directory
# run: |
# mkdir -p dist-linux
# mv src-tauri/target/release/algokit-explorer dist-linux
# mkdir -p dist
# mv src-tauri/target/release/algokit-explorer dist
# shell: bash

- name: HACK - move binary to target directory
run: |
mkdir -p dist-linux
mv src/assets/react.svg dist-linux/algokit-explorer
mkdir -p dist
mv src/assets/react.svg dist/algokit-explorer
shell: bash

- name: Generate snapcraft.yaml
run: |
./scripts/snap/create-snapcraft-yaml.sh ${{ github.workspace }} ${{ inputs.release-version }} "stable" "dist-linux"
./scripts/snap/create-snapcraft-yaml.sh ${{ github.workspace }} ${{ inputs.release-version }} "stable" "dist"
shell: bash

- name: Upload binary as artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: algokit-explorer-linux-${{ runner.arch }}
path: |
dist-linux/algokit-explorer
snap/snapcraft.yaml
if-no-files-found: error
name: algokit-explorer-${{ runner.arch }}
path: dist
4 changes: 2 additions & 2 deletions .github/actions/publish-linux-snap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
- name: Build snap
uses: snapcore/action-build@v1
with:
path: linux-artifacts
path: ${{ inputs.artifacts-path }}
snapcraft-args: --target-arch amd64

- name: Upload binary as artifact
Expand All @@ -27,7 +27,7 @@ runs:
with:
name: algokit-explorer-linux-snap
path: |
linux-artifacts/*.snap
${{ inputs.artifacts-path }}/*.snap
#TODO: in this action, we only publish the snap as an artifact for testing purposes
# once we have the release token, we will publish the snap to Snap Store
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,16 @@ jobs:
with:
fetch-depth: 0

- uses: actions/download-artifact@v4
- name: Download Linux artifacts
uses: actions/download-artifact@v4
with:
name: algokit-explorer-linux
merge-multiple: true
path: artifacts
path: linux-artifacts

- name: publish Linux Snap
if: ${{ runner.os == 'Linux' }}
uses: ./.github/actions/publish-linux-snap
with:
artifacts-path: artifacts
artifacts-path: linux-artifacts
linux-artifact-name: ${{ needs.build-tauri.outputs.linux-artifact-name }}
2 changes: 1 addition & 1 deletion scripts/snap/create-snapcraft-yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ apps:
- wayland
EOF

echo "snapcraft.yaml has been created at ${DESTINATION_DIR}/snap/snapcraft.yaml"
echo "snapcraft.yaml has been created at ${DESTINATION_DIR}/snapcraft.yaml"

0 comments on commit bd980a9

Please sign in to comment.