Create release #15
Workflow file for this run
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: Create release | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build libraries | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: Chechout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Config environment | |
if: runner.os == 'Linux' | |
run: sudo apt-get install gcc-multilib | |
- name: Setup Fortran Compiler | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: intel-classic | |
- name: Build C library | |
run: python buildall.py -ft ${{ runner.os != 'macOS' && '-pt -v' || '-v' }} | |
- name: Display structure of files | |
run: ls -R | |
- name: Upload Artifact | |
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 | |
with: | |
name: build-artifacts-${{ matrix.os }} | |
path: build*/**/bin | |
create_release: | |
permissions: | |
contents: write # for actions/create-release to create a release | |
name: Create release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Chechout sources | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 | |
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@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 | |
with: | |
path: build-artifacts | |
pattern: build-artifacts-* | |
merge-multiple: true | |
- 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@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 | |
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 |