-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
168 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,27 +148,49 @@ jobs: | |
if: false # Can't make CI pass, disable for now | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
runs-on: ${{ matrix.os }} | ||
arch: | ||
- amd64 | ||
- arm64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup sccache | ||
uses: mozilla-actions/[email protected] | ||
- uses: canonical/[email protected] | ||
|
||
- name: Build | ||
uses: snapcore/action-build@v1 | ||
- name: Setup snapcraft | ||
run: | | ||
sudo snap install --classic snapcraft | ||
mkdir -p ~/.local/share/snapcraft | ||
echo "${{ secrets.LP_TOKEN }}" > ~/.local/share/snapcraft/launchpad-credentials | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "Github Actions" | ||
- name: Build snap | ||
env: | ||
arch: ${{ matrix.arch }} | ||
run: | | ||
# Modify the `platforms` to use a single arch only, but run this in a matrix so they | ||
# all get hit | ||
yq -i '.platforms |= {env(arch): {"build-on": env(arch)}}' snap/snapcraft.yaml | ||
# Now run a remote-build, targeting just the single arch specified | ||
snapcraft remote-build --launchpad-accept-public-upload | ||
# Output the build logs from the remote-build | ||
cat snapcraft-yazi*.txt || echo "Could not find build log" | ||
- name: Rename snap | ||
run: mv yazi_*.snap yazi-${{ matrix.target }}.snap | ||
run: mv yazi_*.snap yazi-${{ matrix.arch }}.snap | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: yazi-${{ matrix.target }}.snap | ||
path: yazi-${{ matrix.target }}.snap | ||
name: yazi-${{ matrix.arch }}.snap | ||
path: yazi-${{ matrix.arch }}.snap | ||
|
||
draft: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ result-* | |
|
||
.idea/ | ||
.vscode/ | ||
|
||
*.snap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters