Skip to content
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

attempt automated release notes #87

Merged
merged 4 commits into from
Oct 13, 2021
Merged

attempt automated release notes #87

merged 4 commits into from
Oct 13, 2021

Conversation

jGaboardi
Copy link
Owner

This PR attempts the adoption of automated release notes in tigernet prior to implementation in spaghetti. See pysal/spaghetti#655 for details.

@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #87 (106d4f2) into main (131b945) will increase coverage by 0.4%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##            main     #87     +/-   ##
=======================================
+ Coverage   83.2%   83.5%   +0.4%     
=======================================
  Files          6       6             
  Lines       1652    1652             
  Branches     420     420             
=======================================
+ Hits        1374    1380      +6     
+ Misses       227     218      -9     
- Partials      51      54      +3     
Impacted Files Coverage Δ
tigernet/_version.py 34.1% <0.0%> (+1.8%) ⬆️

@martinfleis
Copy link
Collaborator

I'm up for trying it out. I think that this does not generate the changelog automatically though. It will give you a button to generate it manually afterward. There should be a way of using the generated changelog within the action, where we now pass the result of gitcount.

@martinfleis
Copy link
Collaborator

@martinfleis
Copy link
Collaborator

This seems to do the trick

on:
  push:
    tags:
      - 'v*'

name: Create Release

jobs:
  create-github-release:
    name: Create GitHub Release
    runs-on: ubuntu-latest
    steps:
      - name: Create Release Notes
        uses: actions/github-script@v4.0.2
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          script: |
            await github.request(`POST /repos/${{ github.repository }}/releases`, {
              tag_name: "${{ github.ref }}",
              generate_release_notes: true
            });

@jGaboardi
Copy link
Owner Author

Good find on that. Does this mean that the .github/release.yml in this PR is not needed? And the Create Release Notes job can be added to the release_and_publish.yml actions?

@jGaboardi
Copy link
Owner Author

Also, @martinfleis can you make a small PR to this repo top test for more contributors than myself? I know how to exclude authors in .github/release.yml, but I'm wondering how to do that with solution you just found.

@martinfleis
Copy link
Collaborator

Good find on that. Does this mean that the .github/release.yml in this PR is not needed?

My understanding is that release.yml is used to customize the resulting notes. If not present, it will use some default.

And the Create Release Notes job can be added to the release_and_publish.yml actions?

Yes, we should be able to just replace the one we have.

Also, @martinfleis can you make a small PR to this repo top test for more contributors than myself?

Sure.

@jGaboardi
Copy link
Owner Author

I am going to merge this, then tag and cut a release. 99% sure it won't work on the first try, but got to start somewhere.

@jGaboardi jGaboardi merged commit f3bf0e3 into main Oct 13, 2021
@jGaboardi
Copy link
Owner Author

Worked the first time!! 🥳

@martinfleis
Copy link
Collaborator

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants