-
Notifications
You must be signed in to change notification settings - Fork 21
Added Github action to auto build releases and generate release notes when a new tag is applied #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
token419
wants to merge
4
commits into
nomns:master
Choose a base branch
from
token419:github-workflow
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| changelog: | ||
| categories: | ||
| - title: Features | ||
| labels: | ||
| - enhancement | ||
| - title: Bugfixes / Minor Tweaks | ||
| labels: | ||
| - bug | ||
| - title: Other Changes | ||
| labels: | ||
| - '*' | ||
| exclude: | ||
| labels: | ||
| - bug | ||
| - enhancement |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
| # https://docs.github.com/en/actions/using-workflows/about-workflows | ||
|
|
||
| name: nParse Build | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "*.*.*" | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| build: | ||
| # Set the target Platform | ||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| # Checkout the code (See Syntax: https://github.com/actions/checkout) | ||
| - uses: actions/checkout@v4 | ||
| # Setup Python (See Syntax: https://github.com/actions/setup-python) | ||
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| # Update pip and install requirements | ||
| - name: Install Python dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt pyinstaller | ||
| # Build the exe with PyInstaller | ||
| - name: Build the application with PyInstaller | ||
| run: | | ||
| PyInstaller nparse_py.spec | ||
| # Prepare assets for packaging | ||
| - name: Prepare assets for packaging | ||
| run: | | ||
| move data dist | ||
| Compress-Archive -Path .\dist\* -Destination nparse_${{ github.ref_name }}.zip | ||
| # Create Release (See Syntax: https://github.com/softprops/action-gh-release) | ||
| - name: Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| generate_release_notes: True # This auto generates release notes. (See Syntax: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) | ||
| files: nparse_${{ github.ref_name }}.zip | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat! Is there an example of what the source for this looks like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found relevant info at: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
The release.yml file is like a template sort of for the release notes from what I could gather. I tried to setup a defaultish template based on the tags that were currently setup/being used in the issues.
I believe the behavior should be the same behavior as if you edit a previous release, and in the notes, hit the auto generate release notes button thingy I believe, not positive though.
On my test branch it simply added a changelog dif between the versions, but I also didn't have any PR's or anything in the test branch I used to create it.
We should definitely look into customizing the release.yml more for sure.