Up version.Refactoring the algorithm for receiving and sending code a… #72
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 Build And Publish Release | |
| on: | |
| push: | |
| tags: | |
| - "v.[0-9]+.[0-9]+.[0-9]+" | |
| env: | |
| #VERSION: 1.0.0 | |
| SOLUTION_NAME: AdamServices.Utilities.QuickCode.sln # Replace with your solution name, i.e. MyWpfApp.sln. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| OUTPUT_PATH: c:/output/ | |
| jobs: | |
| build: | |
| runs-on: windows-latest # For a list of available runner types, refer to | |
| # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set Version Variable | |
| if: ${{ github.ref_type == 'tag' }} | |
| run: | | |
| $PARSED_VERSION = "${{ github.ref_name }}".replace('v.', '') | |
| echo "VERSION=$PARSED_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Restore the application | |
| run: msbuild $env:SOLUTION_NAME /t:Restore /p:OutDir=$env:OUTPUT_PATH /p:Configuration=Release | |
| - name: Build the application | |
| run: msbuild $env:SOLUTION_NAME /t:Build /p:OutDir=$env:OUTPUT_PATH /p:Configuration=Release | |
| - name: Zip release | |
| uses: TheDoctor0/zip-release@0.7.6 | |
| with: | |
| filename: "QuickCode.portable.zip" | |
| directory: "${{ env.OUTPUT_PATH }}" | |
| - name: Publish Release | |
| uses: "slord399/action-automatic-releases@v1.0.1" | |
| with: | |
| title: "Release v.${{ env.VERSION }}" | |
| repo_token: "${{ env.GITHUB_TOKEN }}" | |
| automatic_release_tag: "v.${{ env.VERSION }}" | |
| prerelease: false | |
| files: "${{ env.OUTPUT_PATH }}*.zip" |