Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Oct 7, 2024
1 parent 47ccae5 commit 93e8003
Show file tree
Hide file tree
Showing 14 changed files with 3,542 additions and 3,014 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release-happ.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

name: "release-tauri-app"
on:
push:
tags:
- 'happ-v[0-9]+.[0-9]+.[0-9]+'
- 'happ-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
94 changes: 0 additions & 94 deletions .github/workflows/release-tauri-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,8 @@ 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

release-tauri-app-linux:
permissions: write-all
# needs: publish-happ
environment: Relay Release
outputs:
releaseId: ${{ steps.build-app.outputs.releaseId }}
Expand Down Expand Up @@ -104,16 +52,6 @@ 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/'

- id: build-app
uses: tauri-apps/tauri-action@v0
env:
Expand Down Expand Up @@ -161,16 +99,6 @@ 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: setup Android signing
run: |
cd src-tauri/gen/android
Expand All @@ -191,7 +119,6 @@ jobs:

release-tauri-app-windows:
permissions: write-all
# needs: publish-happ
environment: Relay Release

runs-on: windows-latest
Expand Down Expand Up @@ -221,16 +148,6 @@ 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: build the app
uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -245,7 +162,6 @@ jobs:
release-tauri-app-macos:
permissions: write-all
environment: Relay Release
# needs: publish-happ

strategy:
fail-fast: false
Expand Down Expand Up @@ -282,16 +198,6 @@ 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: build the app
uses: tauri-apps/tauri-action@v0
env:
Expand Down
Loading

0 comments on commit 93e8003

Please sign in to comment.