Skip to content

Commit

Permalink
The most significant changes involve the renaming and modification of…
Browse files Browse the repository at this point in the history
… the "Build App" step, and the addition of a 'v' prefix to the version number in the "Create tag", "Create release draft", and "Upload MSI to release" steps.

1. The "Build App" step has been renamed to "Publish App (framework-dependent)" and "Publish App (self-contained)" for framework-dependent and self-contained builds respectively. The command to run has also been changed from `dotnet restore src` to `dotnet publish` with additional parameters. This change allows for more specific and accurate build processes.

2. The "Create tag" step has been updated to prefix the version number with 'v'. The tag name is now stored in the `env.TAG_NAME` variable. This change standardizes the versioning format and allows for easier reference to specific versions.

3. The "Create release draft" step has been updated to use the version number prefixed with 'v'. The release draft is now created with the tag name stored in the `env.TAG_NAME` variable. This change ensures consistency between the tag and release draft.

4. The "Upload MSI to release" step has been updated to use the version number prefixed with 'v'. The MSI file is uploaded to the release created with the tag name stored in the `env.TAG_NAME` variable. This change ensures that the uploaded MSI file corresponds to the correct release version.

References to the code changes can be found in the respective steps of the build process.
  • Loading branch information
amgdy committed Apr 23, 2024
1 parent 7cd3521 commit f13e865
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ jobs:
- name: 🔄 Restore NuGet Packages
run: dotnet restore src

- name: 🏗️ Build App
- name: 🏗️ Publish App (framework-dependent)
if: ${{ github.event.inputs.SelfContained == 'false' }}
run: dotnet publish ${{env.APP_PROJECT_PATH}} -c=Release -o=${{env.APP_PROJECT_OUTPUT}} --p:FileVersion=${{env.VERSION}} --p:AssemblyVersion=${{env.VERSION}} --p:Version=${{env.VERSION}} -p:SourceRevisionId=${{ github.sha }}

- name: 🏗️ Build App (Self-contained)
- name: 🏗️ Publish App (self-contained)
if: ${{ github.event.inputs.SelfContained == 'true' }}
run: dotnet publish ${{env.APP_PROJECT_PATH}} -c=Release -o=${{env.APP_PROJECT_OUTPUT}} --p:FileVersion=${{env.VERSION}} --p:AssemblyVersion=${{env.VERSION}} --p:Version=${{env.VERSION}} -r=win-x64 --self-contained=true -p:SourceRevisionId=${{ github.sha }}

Expand All @@ -89,21 +89,21 @@ jobs:
name: ${{env.MSI_FILE_NAME}}
path: ${{env.MSI_PROJECT_OUTPUT}}\${{env.MSI_FILE_NAME}}.msi

- name: 🏷️ Create tag ${{ github.event.inputs.Version }}
- name: 🏷️ Create tag v${{ github.event.inputs.Version }}
if: ${{ github.event.inputs.CreateRelease == 'true' }}
run: |
git tag ${{ github.event.inputs.Version }}
git push origin ${{ github.event.inputs.Version }}
git tag ${{ env.TAG_NAME }}
git push origin ${{ env.TAG_NAME }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 📝 Create release draft ${{ env.TAG_NAME }}
- name: 📝 Create release draft v${{ github.event.inputs.Version }}
if: ${{ github.event.inputs.CreateRelease == 'true' }}
run: gh release create ${{ env.TAG_NAME }} --target ${{ github.ref }} --draft --title "${{ env.TAG_NAME }}" --generate-notes --prerelease --draft
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 📤 Upload MSI to release ${{ env.TAG_NAME }}
- name: 📤 Upload MSI to release v${{ github.event.inputs.Version }}
if: ${{ github.event.inputs.CreateRelease == 'true' }}
run: gh release upload ${{ env.TAG_NAME }} ${{env.MSI_PROJECT_OUTPUT}}\${{env.MSI_FILE_NAME}}.msi
env:
Expand Down

0 comments on commit f13e865

Please sign in to comment.