update restop.yml #6
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: restop | |
on: [push] | |
jobs: | |
x86_64-2010-build: | |
runs-on: ubuntu-latest | |
container: quay.io/pypa/manylinux2010_x86_64 | |
steps: | |
- name: Show GLIBC | |
run: ldd --version | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.sha || env.GITHUB_SHA }} | |
- name: Set env on push | |
if: github.event_name == 'push' | |
run: | | |
echo "INPUT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
echo "INPUT_TAG=$(git tag --points-at HEAD)" >> $GITHUB_ENV | |
- name: Set env on trigger | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
echo "INPUT_SHA=${{ github.event.inputs.sha }}" >> $GITHUB_ENV | |
echo "INPUT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Process and Package | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
env: | |
SOURCE_TAG: ${{ steps.config.outputs.SOURCE_TAG }} | |
TARGET_NAME: ${{ steps.config.outputs.TARGET_NAME }} | |
run: echo SOURCE_TAG ${SOURCE_TAG} && echo TARGET_NAME ${TARGET_NAME} && ls -l src/target/ && cp src/target/${TARGET_NAME}/release/restop . && zip -j restop_${TARGET_NAME}_${SOURCE_TAG}.zip restop | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
restop_${{ steps.config.outputs.TARGET_NAME }}_${{ steps.config.outputs.SOURCE_TAG }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |