Skip to content

Commit

Permalink
fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
t-aleksander committed Oct 10, 2024
1 parent f6c8e2c commit fcbd325
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 45 deletions.
85 changes: 45 additions & 40 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build app & create release"
name: 'Build app and create release'
on:
push:
tags:
Expand All @@ -18,9 +18,9 @@ jobs:
ref: master
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
- name: Build wireguard-go binary
run: make
env:
Expand Down Expand Up @@ -56,21 +56,33 @@ jobs:
runs-on:
- self-hosted
- Linux
- ${{ matrix.architecture }}
strategy:
fail-fast: false
matrix:
architecture: [ARM64, X64]
include:
- architecture: ARM64
deb_arch: arm64
binary_arch: aarch64
- architecture: X64
deb_arch: amd64
binary_arch: x86_64
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
submodules: 'recursive'
- name: Write release version
run: |
VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1)
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/setup-node@v3
with:
node-version: "20"
node-version: '20'
- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
Expand All @@ -83,13 +95,13 @@ jobs:
key: ${{ runner.os }}-pnpm-build-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-build-store-
- name: Install deps
- name: Install Node dependencies
run: pnpm install --frozen-lockfile
- uses: dtolnay/rust-toolchain@stable
- name: install linux deps
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unzip
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev unzip protobuf-compiler libprotobuf-dev
- name: Build packages
uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -100,53 +112,44 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_amd64.deb
asset_name: defguard-client_${{ env.VERSION }}_amd64.deb
asset_content_type: application/octet-stream
- name: Upload AppImage
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: src-tauri/target/release/bundle/appimage/defguard-client_${{ env.VERSION }}_amd64.AppImage
asset_name: defguard-client_${{ env.VERSION }}_amd64.AppImage
asset_path: src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
asset_name: defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
asset_content_type: application/octet-stream
- name: Rename client binary
run: mv src-tauri/target/release/defguard-client defguard-client-linux-x86_64-${{ github.ref_name }}
run: mv src-tauri/target/release/defguard-client defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
- name: Tar client binary
uses: a7ul/[email protected]
with:
command: c
files: |
defguard-client-linux-x86_64-${{ github.ref_name }}
outPath: defguard-client-linux-x86_64-${{ github.ref_name }}.tar.gz
defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
outPath: defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
- name: Upload client archive
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-client-linux-x86_64-${{ github.ref_name }}.tar.gz
asset_name: defguard-client-linux-x86_64-${{ github.ref_name }}.tar.gz
asset_path: defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_name: defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_content_type: application/octet-stream
- name: Rename daemon binary
run: mv src-tauri/target/release/defguard-service defguard-service-linux-x86_64-${{ github.ref_name }}
run: mv src-tauri/target/release/defguard-service defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
- name: Tar daemon binary
uses: a7ul/[email protected]
with:
command: c
files: |
defguard-service-linux-x86_64-${{ github.ref_name }}
outPath: defguard-service-linux-x86_64-${{ github.ref_name }}.tar.gz
defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
outPath: defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
- name: Upload daemon archive
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-service-linux-x86_64-${{ github.ref_name }}.tar.gz
asset_name: defguard-service-linux-x86_64-${{ github.ref_name }}.tar.gz
asset_path: defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_name: defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_content_type: application/octet-stream
build-macos:
needs:
Expand All @@ -162,18 +165,18 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
submodules: 'recursive'
- name: Write release version
run: |
VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1)
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/setup-node@v3
with:
node-version: "20"
node-version: '20'
- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -203,12 +206,12 @@ jobs:
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_SIGNING_IDENTITY: "Developer ID Application: TEONITE (6WD6W6WQNV)"
APPLE_SIGNING_IDENTITY: 'Developer ID Application: TEONITE (6WD6W6WQNV)'
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_ID: "[email protected]"
APPLE_ID: '[email protected]'
APPLE_PASSWORD: ${{ secrets.NOTARYTOOL_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: "6WD6W6WQNV"
APPLE_TEAM_ID: '6WD6W6WQNV'
with:
args: --target ${{ matrix.target }} -v
- name: Build installation package
Expand Down Expand Up @@ -240,18 +243,18 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
submodules: 'recursive'
- name: Write release version
run: |
$env:VERSION=echo ($env:GITHUB_REF_NAME.Substring(1) -Split "-")[0]
echo Version: $env:VERSION
echo "VERSION=$env:VERSION" >> $env:GITHUB_ENV
- uses: actions/setup-node@v3
with:
node-version: "20"
node-version: '20'
- uses: pnpm/action-setup@v2
with:
version: 8
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -299,6 +302,7 @@ jobs:
runs-on:
- self-hosted
- Linux
- X64
steps:
- name: Write release version
run: |
Expand All @@ -323,7 +327,7 @@ jobs:
- sign-burn-engine
runs-on: windows-latest
steps:
- name: Download unsigned bundle & signed burn-engine
- name: Download unsigned bundle and signed burn-engine
uses: actions/download-artifact@v4
with:
name: unsigned-bundle-and-signed-burnengine
Expand All @@ -346,6 +350,7 @@ jobs:
runs-on:
- self-hosted
- Linux
- X64
steps:
- name: Write release version
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ on:
- main
- dev
paths-ignore:
- "*.md"
- "LICENSE"
- '*.md'
- 'LICENSE'
pull_request:
branches:
- main
- dev
paths-ignore:
- "*.md"
- "LICENSE"
- '*.md'
- 'LICENSE'

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: [self-hosted, Linux]
runs-on: [self-hosted, Linux, X64]
container: rust:1.74
defaults:
run:
Expand Down

0 comments on commit fcbd325

Please sign in to comment.