Skip to content

Add missing dependency for Linux #67

Add missing dependency for Linux

Add missing dependency for Linux #67

name: Create Version Tag
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
extension: ".zip"
runtime: "win-x64"
- os: ubuntu-latest
extension: ".tar.gz"
runtime: "linux-x64"
- os: macos-latest
runtime: "osx-x64"
extension: ".zip"
node_version: [22]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
PROJECT_NAME: "Angor"
SOLUTION_PATH: "src/Angor.sln"
PROJECT_PATH: "src/Angor/Server/Angor.Server.csproj"
BUILD_CONFIGURATION: "Release"
steps:
- uses: actions/checkout@v1
name: Checkout
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
9.0.x
- name: Setup Node.js (${{ matrix.node_version }})
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install Rust (Stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# Install Linux dependencies
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libsoup-3.0-dev
- name: Variables
run: |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV
shell: bash
- name: Workload
run: dotnet workload restore ${{env.SOLUTION_PATH}}
- name: Restore
run: dotnet restore ${{env.SOLUTION_PATH}}
- name: Unit Test
run: dotnet test -v=normal -c ${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_PATH}}
# this will check if the file 'Directory.Build.props' has changed,
# and if yes it creates a version tag which will trigger a
# deployment processes of 3 steps:
# version creation -> draft release package -> deployment mainet/testnet/signet
# Install dependencies and build Tauri
- name: Install and build
run: |
npm install
npm run tauri:build
# Upload artifacts
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PROJECT_NAME }}-${{ matrix.runtime }}${{ matrix.extension }}
path: |
src-tauri/target/release/bundle/macos/*.app
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/msi/*.msi
if-no-files-found: ignore
compression-level: 6 # Optimal compression level (0-9)
# ...existing code for checking Directory.Build.props and creating tag...
- name: Check for changes in Directory.Build.props
if: matrix.os == 'ubuntu-latest'
id: check_changes
run: |
if git diff --name-only HEAD^ HEAD | grep -q '^src/Directory.Build.props$'; then
echo "File Directory.Build.props has changed."
echo "::set-output name=changed::true"
else
echo "File Directory.Build.props has not changed."
echo "::set-output name=changed::false"
fi
# we must use a custom token to trigger workflows ANGOR_DEPLOY_TOKEN
# https://docs.github.com/en/actions/using-workflows/triggering-a-workflow
- name: Create tag
if: steps.check_changes.outputs.changed == 'true'
continue-on-error: true
env:
TAG_NAME: "v${{env.VERSION}}"
run: |
sleep 10
git tag $TAG_NAME
git push https://x-access-token:${{ secrets.ANGOR_DEPLOY_TOKEN }}@github.com/${{ github.repository }} $TAG_NAME