Read, write, validate and pool SDRF-Proteomics experimental-design fi… #69
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+" | |
| env: | |
| DOTNET_VERSION: 10.0.x | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Set up NuGet | |
| uses: nuget/setup-nuget@v1 | |
| with: | |
| nuget-version: '6.x' | |
| - name: Verify commit exists in origin/master | |
| 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: | | |
| cd mzLib | |
| dotnet restore | |
| # Build the packaged assemblies as Any CPU rather than x64. An x64 PlatformTarget stamps AMD64 into | |
| # the PE header, and an arm64 .NET runtime then refuses the assembly with | |
| # "FileLoadException: Could not load file or assembly '<name>'". Any CPU assemblies still run 64-bit | |
| # on a 64-bit runtime, so x64 consumers are unaffected. Output moves from bin/x64/Release to | |
| # bin/Release, which is where mzLib.nuspec now looks. | |
| - name: Build | |
| run: | | |
| $version= &git describe --tags | |
| cd mzLib | |
| dotnet build --no-restore --configuration Release /p:Platform="Any CPU" /p:Version=${version} | |
| - name: Test | |
| run: | | |
| $version= &git describe --tags | |
| cd mzLib | |
| dotnet test --configuration Release /p:Platform="Any CPU" /p:Version=${version} --no-build | |
| - name: Pack and Push NuGet Package | |
| run: | | |
| $version= &git describe --tags | |
| cd mzLib | |
| nuget pack mzLib.nuspec -Version ${version} -Properties Configuration=Release | |
| dotnet nuget push mzLib.${version}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${env:GITHUB_TOKEN} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.NUGET_KEY }} |