Skip to content

Improving cleanup of processes; bumping version #32

Improving cleanup of processes; bumping version

Improving cleanup of processes; bumping version #32

Workflow file for this run

name: Release
on:
push:
tags: # Sequence of patterns matched against refs/tags
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
outputs:
artifact_upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
artifacts:
needs: [ release ]
name: Build Artifacts
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Build
run: cargo build --release --all-features --target ${{ matrix.target }}
- name: Package release
run: |
mkdir -p target/psctl-${{ github.sha }}/bin && cp target/${{ matrix.target }}/release/psctl target/psctl-${{ github.sha }}/bin/psctl
tar -zcvf psctl-${{ github.ref_name }}-${{ matrix.target }}.tgz --strip-components 1 target/psctl-${{ github.sha }}/bin/psctl
- name: Upload artifact
uses: actions/upload-release-asset@v1
env: # GITHUB_TOKEN must be given write permission in Repo > Settings > Actions
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.artifact_upload_url }}
asset_path: psctl-${{ github.ref_name }}-${{ matrix.target }}.tgz
asset_name: psctl-${{ github.ref_name }}-${{ matrix.target }}.tgz
asset_content_type: application/x-tgz