Merge branch 'fix/release-workflow' #5
Workflow file for this run
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
name: "release-tauri-app" | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-dev.[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: Extend space | |
uses: ./.github/actions/extend-space | |
- name: Install nix | |
uses: cachix/install-nix-action@v18 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
experimental-features = flakes nix-command | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: holochain-ci | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: darksoil-studio | |
- name: Install and test | |
run: | | |
nix-store --gc | |
nix develop --command bash -c "npm i && 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: Relay-v${{ steps.version.outputs.APP_VERSION }} | |
prerelease: true | |
draft: true | |
release-tauri-app: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-2019, macos-11, ubuntu-22.04] | |
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 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 | |
id: release_data | |
uses: KevinRohn/github-full-release-data@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
repository: "holochain-apps/volla-chat" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: Relay-v${{ needs.publish-happ.outputs.appVersion }} | |
asset-file: '*.happ' | |
asset-output: '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 |