Skip to content

fix release

fix release #40

Workflow file for this run

name: Release
on:
push:
branches: [ "main" ]
tags: 'v*'
paths-ignore:
- 'doc/**'
- '.github/**'
- 'README.md'
- 'LICENSE'
- '.gitignore'
- 'CONTRIBUTING'
workflow_dispatch:
jobs:
build_test_and_bundle:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-20.04, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: setup rust stable
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: unit tests
run: |
cp tests/*.json .
cargo test --all --release
- name: bundle
shell: bash
run: |
mkdir Pulse
cp target/release/pulse Pulse/pulse-${{ matrix.os }}
cp LICENSE Pulse/
- name: upload bundle
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: Pulse
release:
needs: [build_test_and_bundle]
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04
steps:
- name: get linux build
uses: actions/download-artifact@v3
with:
name: ubuntu-20.04
- name: get windows build
uses: actions/download-artifact@v3
with:
name: windows-latest
- name: get macos build
uses: actions/download-artifact@v3
with:
name: macos-latest
- name: pack
run: |
mkdir linux windows macos
ls
mv pulse-ubuntu-20.04 pulse
chmod +x pulse
tar -cvf pulse-linux-x86_64.tar.gz pulse LICENSE
mv pulse-windows-latest.exe pulse.exe
chmod +x pulse.exe
zip pulse-windows.zip pulse.exe LICENSE
mv pulse-macos-latest pulse
chmod +x pulse
tar -cvf pulse-macOS.tar.gz pulse LICENSE
# https://github.com/softprops/action-gh-release
- name: release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: true
name: "release-${{ github.ref_name }}"
tag_name: ${{ github.ref }}
files: |
pulse-linux-x86_64.tar.gz
pulse-windows.zip
pulse-macOS.tar.gz