Skip to content

Commit

Permalink
The most significant changes include the update of the run-name in …
Browse files Browse the repository at this point in the history
…the `Build & Release` job to incorporate the version number from the GitHub event inputs. Additionally, an environment variable `GH_TOKEN` has been introduced to several steps, and the `run` commands in two steps have been simplified.

1. The `run-name` in the `Build & Release` job now includes the version number from the GitHub event inputs. This change allows for better tracking and identification of different versions of the build.

2. The `GH_TOKEN` environment variable has been added to the `Create tag`, `Create release draft`, and `Upload MSI to release` steps. This variable is set to the value of the `GITHUB_TOKEN` secret, which helps in authenticating and authorizing actions within these steps.

3. The `run` commands in the `Create release draft` and `Upload MSI to release` steps have been simplified. The multiline string syntax (`|-`) has been removed, making the commands more straightforward. However, the commands themselves remain the same, ensuring that the functionality of these steps is not affected.

References to the code changes can be found in the respective files and steps mentioned above.
  • Loading branch information
amgdy committed Apr 23, 2024
1 parent 195af07 commit 73fad24
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
default: false

name: 🏗️ Build & Release
run-name: 🏗️ Build Create release draft for ${{ github.event.inputs.Version }}
run-name: 🏗️ Build & Release ${{ github.event.inputs.Version }}


permissions:
Expand Down Expand Up @@ -94,13 +94,17 @@ jobs:
run: |
git tag ${{ github.event.inputs.Version }}
git push origin ${{ github.event.inputs.Version }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

- name: 📤 Upload MSI to release ${{ github.event.inputs.Version }}
if: github.event.inputs.CreateRelease
run: |
gh release upload ${{ github.event.inputs.Version }} ${{env.MSI_PROJECT_OUTPUT}}/${{env.MSI_FILE_NAME}}.msi
run: gh release upload ${{ github.event.inputs.Version }} ${{env.MSI_PROJECT_OUTPUT}}/${{env.MSI_FILE_NAME}}.msi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 73fad24

Please sign in to comment.