Skip to content

Commit

Permalink
ci: release
Browse files Browse the repository at this point in the history
  • Loading branch information
jizizr committed Nov 17, 2024
1 parent 1852b9d commit c3ea500
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: "Tag version to release"
required: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
extension: ".tar.gz"
system_name: "linux"
- os: macos-latest
extension: ".tar.gz"
system_name: "macos"
- os: windows-latest
extension: ".zip"
system_name: "windows"

steps:
# Checkout the repository
- uses: actions/checkout@v4

# Set up Rust environment
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
# Build Rust backend
- name: Build
run: cargo build --release
- name: Archive atrifacts
if: ${{matrix.os != 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: ping-server-rs-${{ matrix.os }}
path: |
./target/release/ping-server-rs
- name: Archive atrifacts
if: ${{matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: ping-server-rs-${{ matrix.os }}
path: |
./target/release/ping-server-rs.exe
Upload-Release:
permissions: write-all
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: output/
merge-multiple: true
- name: Upload Release
uses: softprops/action-gh-release@v2
with:
files: output/*
tag_name: ${{ github.event.inputs.version }}

0 comments on commit c3ea500

Please sign in to comment.