Skip to content

Commit

Permalink
Added prepare to download .happ
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Sep 26, 2024
1 parent 63e1130 commit fc0f520
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 78 deletions.
154 changes: 77 additions & 77 deletions .github/workflows/release-tauri-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,56 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+-[a-z]+.[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@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05

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

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

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

- name: Install and test
run: |
nix-store --gc
nix develop --no-update-lock-file --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/relay.happ"
body: "See assets below to download and install this version."
name: Relay v${{ steps.version.outputs.APP_VERSION }}
tag: v${{ steps.version.outputs.APP_VERSION }}
prerelease: true
draft: false
# 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@v27
# with:
# github_access_token: ${{ secrets.GITHUB_TOKEN }}
# nix_path: nixpkgs=channel:nixos-24.05

# - uses: cachix/cachix-action@v15
# with:
# name: holochain-ci

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

# - uses: cachix/cachix-action@v15
# with:
# name: darksoil-studio

# - name: Install and test
# run: |
# nix-store --gc
# nix develop --no-update-lock-file --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/relay.happ"
# body: "See assets below to download and install this version."
# name: Relay v${{ steps.version.outputs.APP_VERSION }}
# tag: v${{ steps.version.outputs.APP_VERSION }}
# prerelease: true
# draft: false

release-tauri-app-android:
permissions: write-all
Expand Down Expand Up @@ -93,15 +93,15 @@ jobs:
run: |
nix develop --no-update-lock-file --command 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: 'relay.happ'
out-file-path: 'workdir/'
# - 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: 'relay.happ'
# out-file-path: 'workdir/'

- name: setup Android signing
run: |
Expand Down Expand Up @@ -167,15 +167,15 @@ jobs:
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: 'relay.happ'
out-file-path: 'workdir/'
# - 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: 'relay.happ'
# out-file-path: 'workdir/'

- name: build the app
uses: tauri-apps/tauri-action@v0
Expand Down Expand Up @@ -270,15 +270,15 @@ jobs:
npm install
npm run build -w ui
- 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: 'relay.happ'
out-file-path: 'workdir/'
# - 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: 'relay.happ'
# out-file-path: 'workdir/'

- name: Build rust deps to workaround https://github.com/tauri-apps/tauri/issues/11054
run: |
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"local-services": "hc run-local-services --bootstrap-interface $INTERNAL_IP --bootstrap-port $BOOTSTRAP_PORT --signal-interfaces $INTERNAL_IP --signal-port $SIGNAL_PORT",
"network:android": "npm run build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) INTERNAL_IP=$(internal-ip --ipv4) concurrently -k \"npm run local-services\" \"UI_PORT=1420 npm run -w ui start\" \"npm run tauri dev\" \"npm run tauri android dev\"",
"launch": "concurrently-repeat \"npm run tauri dev\" $AGENTS",
"tauri": "tauri"
"tauri": "tauri",
"prepare": "curl -L https://github.com/holochain-apps/relay/releases/download/v0.5.3-beta/relay.happ -o workdir/relay.happ"
},
"devDependencies": {
"@holochain-playground/cli": "^0.2.0",
Expand Down

0 comments on commit fc0f520

Please sign in to comment.