Skip to content

Commit

Permalink
Add release build github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master committed Jan 15, 2024
1 parent da52cbe commit a168fb5
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Release

on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:

permissions:
contents: write

env:
CARGO_TERM_COLOR: always

jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
include:
- os: windows-latest
os-name: windows
executable-extension: .exe
- os: ubuntu-latest
os-name: linux

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Build
run: cargo build --release

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os-name }}-client
path: ./target/release/client${{ matrix.executable-extension }}

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os-name }}-server
path: ./target/release/server${{ matrix.executable-extension }}

release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
- uses: softprops/action-gh-release@v1

0 comments on commit a168fb5

Please sign in to comment.