Skip to content

update deps; bump version to 1.0.4 (#18) #10

update deps; bump version to 1.0.4 (#18)

update deps; bump version to 1.0.4 (#18) #10

Workflow file for this run

# Builds and releases binaries
name: Release Binaries
# Controls when the workflow will run
on:
push:
tags:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Cancel existing executions when new commits are pushed onto the branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v3
- name: Install Rust (Stable)
run:
curl https://sh.rustup.rs -sSf | sh -s -- -y
# Just directly invoke cargo
- name: Cargo Build
run: cargo build --release
- name: Cargo Build (Windows 32 bit)
if: matrix.os == 'windows-latest'
run: |
rustup target add i686-pc-windows-msvc
cargo build --target=i686-pc-windows-msvc --release
- name: Zip (linux)
if: matrix.os == 'ubuntu-latest'
run: |
mkdir lib
cp target/release/libpollnet.so lib/
zip -r "pollnet_${{ matrix.os }}.zip" lib bindings examples LICENSE README.md
- name: Zip (windows)
if: matrix.os == 'windows-latest'
run: |
mkdir lib
mkdir lib32
cp target/release/pollnet.dll lib/
cp target/release/pollnet.dll.lib lib/
cp target/i686-pc-windows-msvc/release/pollnet.dll lib32/
cp target/i686-pc-windows-msvc/release/pollnet.dll.lib lib32/
7z a "pollnet_${{ matrix.os }}.zip" lib lib32 bindings examples LICENSE README.md
- name: Publish Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: pollnet_${{ matrix.os }}.zip
token: ${{ secrets.GITHUB_TOKEN }}