Bump to net8.0 to be in sdk mode and match CI of existing tools #2
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # Triggers on version tags | |
| branches: | |
| - '**' # Triggers on all branches | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest # Use a single runner | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '8.0' | |
| - name: Git Version | |
| id: version | |
| uses: codacy/git-version@2.5.4 | |
| - name: Build | |
| run: | | |
| dotnet publish --configuration Release --runtime win-x64 --no-self-contained --output publish/donut-windows-amd64 DoNut | |
| dotnet publish --configuration Release --runtime linux-x64 --no-self-contained --output publish/donut-linux-amd64 DoNut | |
| pushd publish/donut-windows-amd64 | |
| zip -r -j ../donut-windows-amd64.zip * | |
| popd | |
| pushd publish/donut-linux-amd64 | |
| zip -r ../donut-linux-amd64.zip * | |
| popd | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| publish/donut-linux-amd64.zip | |
| publish/donut-windows-amd64.zip | |
| tag_name: ${{ steps.version.outputs.version }}.${{ github.run_number }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |