-
Notifications
You must be signed in to change notification settings - Fork 52
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
9 changed files
with
181 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ | ||
v ✰ Thanks for creating a PR! ✰ | ||
v Before hitting that submit button please review the checkboxes. | ||
v If a checkbox is n/a - please still include it but + a little note why | ||
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> | ||
|
||
## Description | ||
|
||
<!-- Add a description of the changes that this PR introduces and the files that | ||
are the most critical to review. | ||
--> | ||
|
||
closes: #XXXX | ||
|
||
--- | ||
|
||
Before we can merge this PR, please make sure that all the following items have been | ||
checked off. If any of the checklist items are not applicable, please leave them but | ||
write a little note why. | ||
|
||
- [ ] Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work. | ||
- [ ] Test following procedure in docs/testing-workflow.md | ||
- [ ] Updated relevant documentation in the code. | ||
- [ ] Re-reviewed `Files changed` in the Github PR explorer. | ||
- [ ] Update the version numbers properly: | ||
* Cargo.toml | ||
* ui/src-tauri/Cargo.toml | ||
* ui/src-tauri/tauri.conf.json | ||
* ui/public/about.html | ||
* ui/package.json |
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 |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: Build and upload binaries | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
setup: | ||
name: Get version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: echo "VERSION=$(cat Cargo.toml | grep ^version | awk -F'=' '{print $2}' | tr -d '\" ')" >> $GITHUB_ENV | ||
outputs: | ||
release_version: ${{ env.VERSION }} | ||
build: | ||
name: Build | ||
needs: setup | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
os_type: ubuntu | ||
artifact_name: manta-signer | ||
asset_name: manta-signer-linux-amd64 | ||
- os: windows-2019 | ||
os_type: windows | ||
artifact_name: manta-signer | ||
asset_name: manta-signer-windows | ||
- os: macos-latest | ||
os_type: macos | ||
artifact_name: manta-signer | ||
asset_name: manta-signer-macos-amd64 | ||
- os: macos-10.15 | ||
os_type: macos | ||
artifact_name: manta-signer | ||
asset_name: manta-signer-macos-amd64 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Cache Cargo build dir | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-cargo | ||
with: | ||
path: ~/.cargo | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./ui/src-tauri/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Cache target dir | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-target | ||
with: | ||
path: ui/src-tauri/target | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./ui/src-tauri/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Fetch reclaim_pk.bin | ||
run: cd ui/src-tauri;curl -OL 'https://github.com/Manta-Network/sdk/raw/main/zkp/reclaim_pk.bin' | ||
- name: Fetch transfer_pk.bin | ||
run: cd ui/src-tauri;curl -OL 'https://github.com/Manta-Network/sdk/raw/main/zkp/transfer_pk.bin' | ||
- name: Hack For Ubuntu Builds | ||
run: cd ui/src-tauri; sed -i /icns/d tauri.conf.json | ||
if: matrix.os_type == 'ubuntu' | ||
- name: Ubuntu Build Dependencies | ||
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev patchelf librsvg2-dev | ||
if: matrix.os_type == 'ubuntu' | ||
- name: Build | ||
run: cd ui;yarn && yarn tauri build | ||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/get-release@v1.2.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
- name: Upload .deb Package | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ui/src-tauri/target/release/bundle/deb/manta-signer_${{ needs.setup.outputs.release_version }}_amd64.deb | ||
asset_name: manta-signer-${{ matrix.os }}_${{ needs.setup.outputs.release_version }}_amd64.deb | ||
asset_content_type: application/binary | ||
if: matrix.os_type == 'ubuntu' && github.event_name == 'release' && github.event.action == 'published' | ||
- name: Upload AppImage Package | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ui/src-tauri/target/release/bundle/appimage/manta-signer_${{ needs.setup.outputs.release_version }}_amd64.AppImage | ||
asset_name: manta-signer-${{ matrix.os }}_${{ needs.setup.outputs.release_version }}_amd64.AppImage | ||
asset_content_type: application/binary | ||
if: matrix.os_type == 'ubuntu' && github.event_name == 'release' && github.event.action == 'published' | ||
- name: Upload MS Installer | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: "ui/src-tauri/target/release/bundle/msi/manta-signer_${{ needs.setup.outputs.release_version }}_x64.msi" | ||
asset_name: "manta-signer-${{ matrix.os }}_${{ needs.setup.outputs.release_version }}_x64.msi" | ||
asset_content_type: application/binary | ||
if: matrix.os_type == 'windows' && github.event_name == 'release' && github.event.action == 'published' | ||
- name: Upload Mac Image | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: "ui/src-tauri/target/release/bundle/dmg/manta-signer_${{ needs.setup.outputs.release_version }}_x64.dmg" | ||
asset_name: "manta-signer-${{ matrix.os }}_${{ needs.setup.outputs.release_version }}_x64.dmg" | ||
asset_content_type: application/binary | ||
if: matrix.os_type == 'macos' && github.event_name == 'release' && github.event.action == 'published' |
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
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
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
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
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
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
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