Skip to content

Flush buffer after forming archive #31

Flush buffer after forming archive

Flush buffer after forming archive #31

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
Build:
uses: ./.github/workflows/ci.yml
Release:
strategy:
matrix:
architecture: [X64, ARM64]
distribution: [Ubuntu]
runs-on:
- self-hosted
- Linux
- ${{matrix.architecture}}
needs:
- Build
steps:
- name: Tar X64 artifacts # Below workaround will allow files to be extracted to a directory e.g. aperf-v0.1-x86_64/
if: ${{ matrix.architecture == 'X64' }}
run: sudo mkdir -p aperf-${{ github.ref_name }}-x86_64 && sudo cp ./target/x86_64-unknown-linux-musl/release/aperf ./aperf-${{ github.ref_name }}-x86_64 && sudo tar -cvzf aperf-${{ github.ref_name }}-x86_64.tar.gz aperf-${{ github.ref_name }}-x86_64/ && sudo rm -rf aperf-${{ github.ref_name }}-x86_64
- name: Tar ARM64 artifacts
if: ${{ matrix.architecture == 'ARM64' }}
run: sudo mkdir -p aperf-${{ github.ref_name }}-aarch64 && sudo cp ./target/aarch64-unknown-linux-musl/release/aperf ./aperf-${{ github.ref_name }}-aarch64 && sudo tar -cvzf aperf-${{ github.ref_name }}-aarch64.tar.gz aperf-${{ github.ref_name }}-aarch64/ && sudo rm -rf aperf-${{ github.ref_name }}-aarch64
- name: Create Release
if: github.run_number == 1
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: APerf-${{ github.ref }}
draft: false
prerelease: false
- name: Upload X64 artifacts.
if: ${{ matrix.architecture == 'X64' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./aperf-${{ github.ref_name }}-x86_64.tar.gz
tag: ${{ github.ref }}
asset_name: aperf-${{ github.ref_name }}-x86_64.tar.gz
- name: Upload ARM64 artifacts
if: ${{ matrix.architecture == 'ARM64' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./aperf-${{ github.ref_name }}-aarch64.tar.gz
tag: ${{ github.ref }}
asset_name: aperf-${{ github.ref_name }}-aarch64.tar.gz