This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
Add cargo lockfile #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
publish: | |
name: Publish for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact_name: netchat-server | |
asset_name: netchat-server-linux-amd64 | |
# - os: ubuntu-latest | |
# artifact_name: netchat-server | |
# asset_name: netchat-server-linux-arm64 | |
# architecture: arm64 | |
- os: windows-latest | |
artifact_name: netchat-server.exe | |
asset_name: netchat-server-windows-amd64.exe | |
- os: macos-latest | |
artifact_name: netchat-server | |
asset_name: netchat-server-macos-amd64 | |
# - os: macos-latest | |
# artifact_name: netchat-server | |
# asset_name: netchat-server-macos-arm64 | |
# architecture: arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install dependencies (Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev | |
- name: Install dependencies (macOS) | |
if: matrix.os == 'macos-latest' | |
run: brew install pkg-config openssl | |
- name: Build | |
run: cargo build --release --locked | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref }} |