Skip to content

Update RunnerEngine.cs (#241) #32

Update RunnerEngine.cs (#241)

Update RunnerEngine.cs (#241) #32

Workflow file for this run

name: Releases
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
githubrelease:
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Verify commit exists in release branch
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/${env:RELEASE_BRANCH}
env:
RELEASE_BRANCH: master
- name: Restore dependencies
run: dotnet restore Spritz/Spritz.sln
- name: Build
run: |
$version= &git describe --tags
dotnet build --no-restore --configuration Release /p:Version=${version} /p:Platform=x64 Spritz/Spritz.sln
- name: Test
run: |
$version= &git describe --tags
dotnet test --configuration Release /p:Platform=x64 /p:Version=${version} --no-build Spritz/Spritz.sln
- name: Setup msbuild
uses: microsoft/[email protected]
- name: Build Installer
run: |
$version= &git describe --tags
msbuild Spritz/SpritzInstaller/SpritzInstaller.wixproj /p:Configuration=Release /p:Version=${version}
- name: Create archive
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'SpritzCMD.zip'
path: Spritz/SpritzCMD/bin/x64/Release/net6.0/
directory: ./
- name: Upload SpritzCMD
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.UPLOAD_TOKEN }}
file: SpritzCMD.zip
tag: ${{ github.ref }}
- name: Upload Installer
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.UPLOAD_TOKEN }}
file: Spritz/SpritzInstaller/bin/Release/Spritz.msi
tag: ${{ github.ref }}
dockerrelease:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore Spritz/SpritzCMD/SpritzCMD.csproj
- name: Build SpritzCMD
run: dotnet build --no-restore /p:Platform=x64 --configuration Release Spritz/SpritzCMD/SpritzCMD.csproj
- name: Build docker image
run: docker build -t spritz ./Spritz/
- name: Run quick test, reference database
run: docker run --user=root spritz conda run --no-capture-output --live-stream dotnet SpritzCMD.dll -a=/app/spritz/results/ -r="release-96,saccharomyces_cerevisiae,baker's yeast,R64-1-1"
- name: Login, tag, and push
run: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
version=$(git describe --tags)
docker tag spritz ${{ secrets.DOCKERHUB_USERNAME }}/spritz:$version
docker push ${{ secrets.DOCKERHUB_USERNAME }}/spritz:$version