Added option to name releaes #9
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: Manual Release | |
on: | |
workflow_dispatch: | |
inputs: | |
name: releaseName | |
type: string | |
description: Name of release | |
name: | |
# Friendly description to be shown in the UI instead of 'name' | |
description: 'Trigger a release built' | |
# Default value if no value is explicitly provided | |
default: 'DBG_RELEASE' | |
# Input has to be provided for the workflow to run | |
required: true | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
name: building OMParser.jl/lib/parser | |
runs-on: ${{ matrix.sys.os }} | |
strategy: | |
matrix: | |
sys: | |
- { os: windows-latest, shell: 'msys2 {0}' } | |
- { os: ubuntu-latest, shell: bash } | |
- { os: macos-latest, shell: bash } | |
defaults: | |
run: | |
shell: ${{ matrix.sys.shell }} | |
steps: | |
- name: setup julia environment | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: "1.10.0" | |
- name: setup msys2 environment | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: false | |
platform-check-severity: warn | |
install: autoconf automake m4 pkg-config libtool base-devel mingw-w64-x86_64-toolchain | |
path-type: inherit # to find julia! | |
- name: set git to use LF on Windows | |
if: contains(matrix.sys.os, 'windows') | |
run: | | |
git config --system core.autocrlf false | |
git config --system core.eol lf | |
- name: Install autotools if the system is macOS | |
if: contains(matrix.sys.os, 'macOS') | |
run: | | |
brew install autoconf | |
brew install automake | |
brew install m4 | |
brew install pkg-config | |
brew install libtool | |
- uses: actions/checkout@v3 | |
- name: configure the library and build | |
run: | | |
which gcc | |
gcc --version | |
cd lib/parser | |
autoconf | |
./configure | |
make | |
cd ../build/lib | |
tar -czvf ${{matrix.sys.os}}-library.tar.gz * | |
mv ${{matrix.sys.os}}-library.tar.gz '${{github.workspace}}/'. | |
- name: Run the testsuite | |
run: julia --color=yes --project -e 'import Pkg; Pkg.add(Pkg.PackageSpec(url="https://github.com/OpenModelica/Absyn.jl.git", rev="master")); Pkg.test("Absyn"); Pkg.test("OMParser")' | |
- name: upload library | |
uses: actions/upload-artifact@v3 | |
with: | |
name: parser-library | |
path: ${{github.workspace}}/${{matrix.sys.os}}-library.tar.gz | |
- name: "Perform Release" | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{github.event.inputs.releaseName}${{matrix.sys.os}}" | |
draft: false | |
prerelease: true | |
files: | | |
${{matrix.sys.os}}-library.tar.gz |