Skip to content

v2.0.0 update to .NET 8.0 and support csharp12 #7

v2.0.0 update to .NET 8.0 and support csharp12

v2.0.0 update to .NET 8.0 and support csharp12 #7

Workflow file for this run

on:
release:
types:
- published
jobs:
build:
strategy:
matrix:
os:
- windows-2022
- ubuntu-20.04
- macos-11
- macos-12-arm
include:
- os: windows-2022
osimage: windows-2022
exename: cs2mmd.exe
runtime: win-x64
- os: ubuntu-20.04
osimage: ubuntu-20.04
exename: cs2mmd
runtime: linux-x64
- os: macos-11
osimage: macos-11
exename: cs2mmd
runtime: osx-x64
- os: macos-12-arm
osimage: macos-11
exename: cs2mmd
runtime: osx-arm64
runs-on: ${{ matrix.osimage }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
name: "setup dotnet 7.0"
with:
dotnet-version: "7.0.x"
- uses: actions/setup-dotnet@v2
name: "setup dotnet 8.0"
with:
dotnet-version: "8.0.x"
- name: "build nuget package"
run: "pwsh ./build.ps1 --target Pack --configuration Release"
if: ${{ matrix.os == 'windows-2022' }}
- name: "build tgz binary"
run: "pwsh ./build.ps1 --target ArchiveTgz --configuration Release --runtime ${{ matrix.runtime }}"
if: ${{ matrix.os != 'windows-2022'}}
- name: "build zip binary"
run: "pwsh ./build.ps1 --target ArchiveZip --configuration Release --runtime ${{ matrix.runtime }}"
if: ${{ matrix.os == 'windows-2022'}}
- name: "collect nupkg"
uses: actions/upload-artifact@v3
with:
name: nupkg
path: |
artifacts/Release/Any/*.nupkg
artifacts/Release/Any/*.snupkg
if: ${{ matrix.os == 'windows-2022' }}
- name: "collect tgz binary"
uses: actions/upload-artifact@v3
with:
name: "tgz-${{ matrix.runtime }}"
path: "artifacts/archive/Release/${{ matrix.runtime }}/*.tgz"
if: ${{ matrix.os != 'windows-2022' }}
- name: "collect zip binary"
uses: actions/upload-artifact@v3
with:
name: "zip-${{ matrix.runtime }}"
path: "artifacts/archive/Release/${{ matrix.runtime }}/*.zip"
if: ${{ matrix.os == 'windows-2022' }}
- name: push nuget package to github package registry
run: "pwsh ./build.ps1 --target Push --configuration Release --api-key ${{secrets.GITHUB_TOKEN}} --package-source https://nuget.pkg.github.com/itn3000/index.json"
if: ${{ matrix.os == 'windows-2022' }}
release:
needs: build
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-dotnet@v2
name: "setup dotnet 7.0.x"
with:
dotnet-version: "7.0.x"
- uses: actions/setup-dotnet@v2
name: "setup dotnet 8.0.x"
with:
dotnet-version: "8.0.x"
- uses: actions/download-artifact@v3
name: "downloading artifacts"
with:
path: artifacts
- name: upload nuget package to nuget.org
run: dotnet nuget push artifacts/nupkg/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
- name: upload tgz to github release
run: gh release upload ${{github.event.release.tag_name}} artifacts/tgz-linux-x64/*.* artifacts/tgz-osx-x64/*.* artifacts/tgz-osx-arm64/*.* --clobber
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: upload zip and nupkg to github release
run: gh release upload ${{github.event.release.tag_name}} artifacts/nupkg/*.* artifacts/zip-win-x64/*.* --clobber
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}