Add a workflow (for testing) #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: .NET Release Workflow | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: '8.0' # Specify your .NET version here | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build the project | |
| run: dotnet build --configuration Release | |
| - name: Run tests | |
| run: dotnet test | |
| - name: Publish the project | |
| run: dotnet publish --configuration Release --output ./publish | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ./publish/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |