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

Fix release by tag #519

Merged
merged 3 commits into from
May 6, 2022
Merged

Fix release by tag #519

merged 3 commits into from
May 6, 2022

Conversation

mkurz
Copy link
Member

@mkurz mkurz commented May 6, 2022

@octonato just tagged 1.6.0-M2, however not artifacts got pushed to maven central.

I think this is because of using double quotes...

password: ${{ secrets.SONATYPE_PASSWORD }}
pgp_passphrase: ${{ secrets.PGP_PASSPHRASE }}
pgp_secret: ${{ secrets.PGP_SECRET }}
secrets: inherit
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeeees, cooool! 🕺

@@ -4,14 +4,10 @@ on:
push:
branches: # Snapshots
- main
tags: ["*"] # Releases
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure but I think double quotes may be seen as normal string? Only when using singlel quotes a string is escaped?

@mkurz mkurz merged commit 588cbd9 into playframework:main May 6, 2022
@mkurz mkurz deleted the fix_publish branch May 6, 2022 20:21
@mkurz
Copy link
Member Author

mkurz commented May 6, 2022

It seems the double quotes are not the problem.
It seems the problem is that when creating a release from the GitHub UI the push tags event will not be called...

@mkurz
Copy link
Member Author

mkurz commented May 6, 2022

Only when git tag .. locally and pushing the tag the workflow will start.

@mkurz
Copy link
Member Author

mkurz commented May 6, 2022

There is the on: release setting, however I am not sure if that is good: What if I git tag locally push (now workflow runs) and then I will push a release with that existing tag... Again a workflow will run. Not so nice.
Also what if I edit a already published release, will the published event trigger again after saving the changes? Have to test.

@ihostage
Copy link
Member

ihostage commented May 6, 2022

It seems the double quotes are not the problem.
It seems the problem is that when creating a release from the GitHub UI the push tags event will not be called...

I remember the same problem in one of Akka repo, but forgot which one exactly 🤦‍♂️
@octonato Maybe you remember?

@ihostage
Copy link
Member

ihostage commented May 6, 2022

Someone from Akka team already analysed this case, I'm sure.

@mkurz
Copy link
Member Author

mkurz commented May 6, 2022

I saw that too, there was a comment from Enno I think, I will investigate.

@mkurz
Copy link
Member Author

mkurz commented May 7, 2022

I found the problem!!! 🥳 😪 I think it's a bug in GitHub... I tried a lot in https://github.com/mkurz/release-drafter-test/

Actually the on push tags: ["*"] setting is correct!
The problem is that when a release draft is created by release drafter, then the author of the draft is github-actions.
Now when publishing the release no publish event will be send - probably because that user does not have permissions to the repository. However the tag is created 🤔 but no events send...

image

I think this is a bug in GitHub, because it should not use the permissions from the author of the draft, but the permissions from the user that clicks "publish" for the release.

When I created a release draft myself (user mkurz), and then published a release via UI, it worked! the push tag event will be send and the release starts! See here for the 1.6.0-M6 tag: https://github.com/playframework/twirl/runs/6331248053?check_suite_focus=true

I will report a bug to GitHub.
Also I have an idea for a workaround already... 👍
(Also I will clean up everything tomorrow)

Update: The release worked: https://repo1.maven.org/maven2/com/typesafe/play/twirl-api_3/

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.

2 participants