publish #1
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: publish | |
| on: | |
| release: | |
| types: 'published' | |
| jobs: | |
| publish: | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: 'main' | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Get Thermo packages | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'thermofisherlsms/RawFileReader' | |
| path: 'ThermoPKG' | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| sparse-checkout: 'Libs/NetCore/Net8/*.nupkg' | |
| sparse-checkout-cone-mode: 'false' | |
| - name: Add Thermo packages as NuGet source | |
| run: | | |
| dotnet nuget add source -n ThermoPKG `pwd`/ThermoPKG/Libs/NetCore/Net8 | |
| - name: Publish all | |
| run: | | |
| dotnet publish --configuration Release --runtime linux-x64 main/ThermoRawFileParser.csproj --sc -o publish/linux-x64 | |
| dotnet publish --configuration Release --runtime win-x64 main/ThermoRawFileParser.csproj --sc -o publish/win-x64 | |
| dotnet publish --configuration Release --runtime osx-x64 main/ThermoRawFileParser.csproj --sc -o publish/osx-x64 | |
| dotnet publish --configuration Release --framework net8.0 main/ThermoRawFileParser.csproj -o publish/net8 | |
| - name: Zipping Linux standalone | |
| uses: vimtor/[email protected] | |
| with: | |
| files: publish/linux-x64 | |
| dest: ThermoRawFileParser-${{ github.ref_name }}-linux.zip | |
| - name: Upload Linux to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ThermoRawFileParser-${{ github.ref_name }}-linux.zip | |
| tag: ${{ github.ref }} | |
| - name: Zipping OSX standalone | |
| uses: vimtor/[email protected] | |
| with: | |
| files: publish/osx-x64 | |
| dest: ThermoRawFileParser-${{ github.ref_name }}-osx.zip | |
| - name: Upload OSX to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ThermoRawFileParser-${{ github.ref_name }}-osx.zip | |
| tag: ${{ github.ref }} | |
| - name: Zipping Windows standalone | |
| uses: vimtor/[email protected] | |
| with: | |
| files: publish/win-x64 | |
| dest: ThermoRawFileParser-${{ github.ref_name }}-win.zip | |
| - name: Upload Windows to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ThermoRawFileParser-${{ github.ref_name }}-win.zip | |
| tag: ${{ github.ref }} | |
| - name: Zipping framework-based | |
| uses: vimtor/[email protected] | |
| with: | |
| files: publish/net8 | |
| dest: ThermoRawFileParser-${{ github.ref_name }}-net8.zip | |
| - name: Upload framework-based to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ThermoRawFileParser-${{ github.ref_name }}-net8.zip | |
| tag: ${{ github.ref }} | |