Skip to content

Create release

Create release #3

Workflow file for this run

name: Create release
on:
push:
tags:
- '*'
jobs:
build:
name: Build libraries
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Config environment
if: runner.os == 'Linux'
run: sudo apt-get install gcc-multilib
- name: Build C library
run: python buildall.py -pt -v
- name: Display structure of files
run: ls -R
- uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build*/**/bin
create_release:
name: Create release
runs-on: ubuntu-latest
needs: build
steps:
- name: Chechout sources
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: release ${{ github.ref_name }}
draft: false
prerelease: false
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Zip files
run: |
zip -r ittapi_build_${{ github.ref_name }}.zip include &&
cd build-artifacts &&
zip -rg ../ittapi_build_${{ github.ref_name }}.zip build*/**/bin &&
cd -
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ittapi_build_${{ github.ref_name }}.zip
asset_name: ittapi_build_${{ github.ref_name }}.zip
asset_content_type: application/zip