90 lines
2.8 KiB
YAML
90 lines
2.8 KiB
YAML
name: Publish Nym Connect - desktop (Ubuntu)
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [created]
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: nym-connect/desktop
|
|
|
|
jobs:
|
|
publish-tauri:
|
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [custom-ubuntu-20.04]
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
outputs:
|
|
release_id: ${{ steps.create-release.outputs.id }}
|
|
release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }}
|
|
version: ${{ steps.release-info.outputs.version }}
|
|
filename: ${{ steps.release-info.outputs.filename }}
|
|
file_hash: ${{ steps.release-info.outputs.file_hash }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Tauri dependencies
|
|
run: >
|
|
sudo apt-get update &&
|
|
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
|
|
continue-on-error: true
|
|
|
|
- name: Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install Rust stable
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Install project dependencies
|
|
shell: bash
|
|
run: cd .. && yarn --network-timeout 100000
|
|
|
|
- name: Install app dependencies
|
|
run: yarn
|
|
|
|
- name: Create env file
|
|
uses: timheuer/base64-to-file@v1.2
|
|
with:
|
|
fileName: '.env'
|
|
encodedString: ${{ secrets.WALLET_ADMIN_ADDRESS }}
|
|
|
|
- name: Build app
|
|
run: yarn build
|
|
env:
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
SENTRY_DSN_RUST: ${{ secrets.SENTRY_DSN_RUST }}
|
|
SENTRY_DSN_JS: ${{ secrets.SENTRY_DSN_JS }}
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nym-connect.AppImage.tar.gz
|
|
path: nym-connect/desktop/target/release/bundle/appimage/nym-connect_1*_amd64.AppImage
|
|
retention-days: 30
|
|
|
|
- id: create-release
|
|
name: Upload to release based on tag name
|
|
uses: softprops/action-gh-release@v1
|
|
if: github.event_name == 'release'
|
|
with:
|
|
files: |
|
|
nym-connect/desktop/target/release/bundle/appimage/*.AppImage
|
|
nym-connect/desktop/target/release/bundle/appimage/*.AppImage.tar.gz*
|
|
|
|
push-release-data:
|
|
if: ${{ (startsWith(github.ref, 'refs/tags/nym-connect-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}
|
|
uses: ./.github/workflows/release-calculate-hash.yml
|
|
needs: publish-tauri
|
|
with:
|
|
release_tag: ${{ github.ref_name }}
|
|
secrets: inherit
|