-
Notifications
You must be signed in to change notification settings - Fork 109
Switch to GitHub Actions 🚀 #338
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
Conversation
github-token: ${{secrets.GITHUB_TOKEN}} | ||
# Workaround since actions/upload-release-asset doesn't support wilcard paths | ||
script: | | ||
const script = require(`${process.env.GITHUB_WORKSPACE}/script/create-release.js`); |
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.
Created a release assets script by taking inspiration from actions/upload-release-asset#47 (comment) 🤓
.github/workflows/ci.yml
Outdated
tag_name: ${{ github.ref }} | ||
release_name: Git ${{ github.ref }} | ||
body: | | ||
TODO add release notes |
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.
Could add generate-release-notes.ts
here, what do you think? Probably needs some tweaks to work correctly with the CI pipeline. Or would you like to keep this as a manual step as per https://github.com/desktop/dugite-native/blob/master/docs/releases.md?
UPDATE: I noticed the script looks for the latest draft release. Then it's easy; we could add this script to the very end of the CI release pipeline and ensure we pass the GITHUB_TOKEN
(automatically created by GH Actions) AFAIK
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 think we should rewrite generate-release-notes.ts
to work exclusively on the artifacts from the build job instead of caring about the GitHub release. I don't see much value (other than it being less work probably) of having it operate on the release using the API.
Let me know if you want me to work on rewriting the script, you've already put so much effort into this so I can understand if you don't want to rewrite our legacy scripts as well 😛
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.
@niik how does this sound: if I make a start on rewriting the script, would you mind having a quick look at desktop/desktop#9691 (comment)? That would make me and many others very happy 😉 Also willing to help with MacOS arm64
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.
This is spectacular (not to mention fast) work @dennisameling, thank you so much! Really looking forward to getting this merged! I had a few comments to start this off but overall this looks great.
.github/workflows/ci.yml
Outdated
tag_name: ${{ github.ref }} | ||
release_name: Git ${{ github.ref }} | ||
body: | | ||
TODO add release notes |
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 think we should rewrite generate-release-notes.ts
to work exclusively on the artifacts from the build job instead of caring about the GitHub release. I don't see much value (other than it being less work probably) of having it operate on the release using the API.
Let me know if you want me to work on rewriting the script, you've already put so much effort into this so I can understand if you don't want to rewrite our legacy scripts as well 😛
Co-authored-by: Markus Olsson <[email protected]>
@niik since we're very close to December 31st (travis-ci.org shutdown), I decided to rework the release notes generation script. Currently waiting for CI to finish a test release on my fork, fingers crossed 🤞🏼 (there's been a massive queue of macOS jobs on GH Actions recently, so that's slowing things down) |
Okay this should be good to go now. Release notes generation is included 🎉 Example run: https://github.com/dennisameling/dugite-native/runs/1601197790?check_suite_focus=true Let me know if there's anything else you'd like me to add/change @niik 👍🏼 |
Thank you so so much @dennisameling. We're super grateful. We'll put this to the test next week when we're planning on doing another dugite-native release. |
Any idea why AppVeyor still thinks it should run? https://ci.appveyor.com/project/github-windows/dugite-native/builds/37157173 |
Ah, probably because I forgot to disable the webhook 🤦 Thanks for the tip, should be sorted now! |
Closes #337
CC @niik, this builds further on https://github.com/desktop/dugite-native/tree/actions
This PR does the following:
set -eu -o pipefail
on the build scripts (this surfaced some bugs in the scripts 🚀)Please check carefully whether this mimics all functionality from Travis/AppVeyor.
Example release run: https://github.com/dennisameling/dugite-native/runs/1463719613?check_suite_focus=true
Example release: https://github.com/dennisameling/dugite-native/releases/tag/v2.99.3-test