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

Automate uploading native images to release notes #1711

Closed
note opened this issue Feb 15, 2020 · 2 comments · Fixed by #2114
Closed

Automate uploading native images to release notes #1711

note opened this issue Feb 15, 2020 · 2 comments · Fixed by #2114

Comments

@note
Copy link
Contributor

note commented Feb 15, 2020

Steps

I tried to install native image according to docs:

$ curl https://raw.githubusercontent.com/scalameta/scalafmt/master/bin/install-scalafmt-native.sh | sh -s -- 2.4.0 . 
...
+ curl --fail -Lo scalafmt-linux.zip https://github.com/scalameta/scalafmt/releases/download/v2.4.0/scalafmt-linux.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found

I took a look at GH release and it makes sense as the only artifacts included to release are source packages. After some digging I found that artifacts are available here: https://github.com/scalameta/scalafmt/actions/runs/39759768

I know literally nothing about Github Actions but I believe it might be worth trying to modify native.yml so it uses https://github.com/actions/upload-release-asset. upload-release-asset has upload_url as an input and https://github.com/release-drafter/release-drafter has it as output.

I may take a look at this in following days. I am assuming github actions are runnable on forks as say travis-ci.

@kitbellew
Copy link
Collaborator

@olafurpg @tanishiking @poslegm if one of you understands about release-drafter (which might be related to this problem), that component is acting up; it has stopped drafting releases, i wrote them manually.

@olafurpg
Copy link
Member

The release drafter service has been discontinued in favor of a custom GitHub action that we haven’t setup in the Scalafmt repo (example https://github.com/scalameta/metals-languageclient/blob/master/.github/workflows/release-drafter.yml).

As for the native image, I have manually uploaded those binaries for releases so far under the assumption that Scalafmt releases are infrequent. there’s been a lot activity lately so it might be worth automating the native image uploading, but to fix this issue it’s probably best to manually download the binaries from the GitHub actions web ui and upload them in the GitHub releases ui.

The tricky part with automating the uploading is that we normally wait with creating a release until the artifacts are available on maven central. Maybe we can somehow run the action on the “release” event 🤔

@poslegm poslegm changed the title Trying to install native image according to docs does not work Automate uploading native images to release notes Apr 15, 2020
poslegm added a commit to poslegm/scalafmt that referenced this issue Jul 24, 2020
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 a pull request may close this issue.

3 participants