Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/p2p shipyard #269

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions .github/workflows/release-tauri-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: "release-tauri-app"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
publish-happ:
permissions:
contents: write
runs-on: ubuntu-22.04
outputs:
releaseId: ${{ steps.create-release.outputs.id }}
appVersion: ${{ steps.version.outputs.APP_VERSION }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks out a copy of your repository on the ubuntu-latest machine
- uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable

- uses: cachix/cachix-action@v12
with:
name: holochain-ci

- uses: cachix/cachix-action@v12
with:
name: holochain-open-dev

- uses: cachix/cachix-action@v12
with:
name: darksoil-studio

- name: Install and test
run: |
nix-store --gc
nix develop --accept-flake-config --command bash -c "npm install && npm run build:happ"

- name: Retrieve version
run: |
echo "APP_VERSION=$(cat src-tauri/tauri.conf.json | grep -oP '(?<="version": ")[^"]*')" >> $GITHUB_OUTPUT
id: version

- id: create-release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "workdir/mewsfeed.happ"
body: "See assets below to download and install this version."
name: Mewsfeed v${{ steps.version.outputs.APP_VERSION }}
tag: v${{ steps.version.outputs.APP_VERSION }}
prerelease: true
draft: true

release-tauri-app:
needs: publish-happ
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''
env:
MACOSX_DEPLOYMENT_TARGET: 10.13

runs-on: ${{ matrix.platform }}
steps:
- name: Support longpaths
if: matrix.platform != 'ubuntu-22.04'
run: git config --system core.longpaths true

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks out a copy of your repository on the ubuntu-latest machine
- uses: actions/checkout@v2

- name: setup node
uses: actions/setup-node@v1
with:
node-version: 20

- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: stable

- name: install x86_64 target
if: matrix.args == '--target x86_64-apple-darwin'
run: rustup target add x86_64-apple-darwin

- name: install Go stable
uses: actions/setup-go@v4
with:
go-version: "stable"

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
javascriptcoregtk-4.1 \
libsoup-3.0 \
webkit2gtk-4.1

- name: Install and prepare
run: |
npm install

- name: Download release of the .happ
uses: robinraju/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
releaseId: ${{ needs.publish-happ.outputs.releaseId }}
fileName: 'mewsfeed.happ'
out-file-path: 'workdir/'

- name: build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.publish-happ.outputs.releaseId }}
releaseDraft: true
prerelease: true
args: ${{ matrix.args }}
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ jobs:
- name: Install JS packages
run: nix develop -c $SHELL -c "npm ci"

- name: Clippy
run: nix develop -c $SHELL -c "npm run cargo:clippy"

- name: Check rust formatting
run: nix develop -c $SHELL -c "npm run cargo:fmt:check"

- name: Build Happ
run: nix develop -c $SHELL -c "npm run build:happ"

- name: Clippy
run: nix develop -c $SHELL -c "npm run cargo:clippy"

- name: Save cargo and build to cache
uses: actions/cache/save@v3
with:
Expand Down
Loading
Loading