Skip to content

upload binaries as artifact #3

upload binaries as artifact

upload binaries as artifact #3

Workflow file for this run

name: Build for Windows 64-bit and 32-bit
on:
workflow_call:
push:
branches:
- tcpserver-master-build
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x86_64, i686]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install SQLite
run: |
choco install sqlite
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.arch }}-pc-windows-msvc
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Build
continue-on-error: true
shell: cmd
run: |
cargo update -p sctgdesk-api-server
set "DATABASE_URL=sqlite://%CD%/db_v2.sqlite3"
set "DATABASE_URL=sqlite://%CD%/db_v2.sqlite3" && cargo build --release --target ${{ matrix.arch }}-pc-windows-msvc
cd target\${{ matrix.arch }}-pc-windows-msvc\release
7z a -tzip /tmp/windows_${{ matrix.arch }}_${{ github.event.release.tag_name }}.zip hbbs.exe hbbr.exe rustdesk-utils.exe
- name: Upload Release Assets binaries for Windows
uses: softprops/action-gh-release@v1
continue-on-error: true
with:
files: |
/tmp/windows_${{ matrix.arch }}_${{ github.event.release.tag_name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ubuntu_amd64
path: |
target/${{ matrix.arch }}-pc-windows-msvc/release/hbbs.exe
target/${{ matrix.arch }}-pc-windows-msvc/release/hbbr.exe
target/${{ matrix.arch }}-pc-windows-msvc/release/rustdesk-utils.exe