You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So now that #1746 is done, time to think about what actually happens when a merge happens to master to the repo, this time in the world of GitHub Actions.
Rationale
In the current version of .travis.yml, a small script (before_script.sh) checks whether this is a PR build or a merge to master, and decides whether to run another script (make_credentials.py).
That script, in turn, inserts a few secrets (kept as environment variables on Travis, so we won't have to check them into source control) into the agent's .m2/settings.xml file. This is done as preparation for publishing to Maven Central (see here for a bit more context), which is then done in the after_success.sh script.
However, it seems thatbefore_script.sh, make_credentials.py and after_success.sh are all redundant when using GH Actions. The setup-java@1 appears to support this exact XML fun out of the box.
In Practice
What would replicating the full .travis.yml look like in GH actions, then?
Note that in the current Travis-based version, every time Travis builds master the deploy lifecycle phase is being run. That means that on every merge to master, a deployment to Maven is made - regardless of an actual release.
To be continued - If anyone has a bit of experience doing this type of migration, feel free to chime in. (@RahulKushwaha I'm looking at you :) )
The text was updated successfully, but these errors were encountered:
@RahulKushwaha Sort of, but coming to think about it - it's going to be hard for you to test without the username & password (or some sort of staging environment on the Maven Central side). I think it's better if you take a look at #1756 instead - mentioning you there.
So now that #1746 is done, time to think about what actually happens when a merge happens to master to the repo, this time in the world of GitHub Actions.
Rationale
In the current version of
.travis.yml
, a small script (before_script.sh
) checks whether this is a PR build or a merge to master, and decides whether to run another script (make_credentials.py
).That script, in turn, inserts a few secrets (kept as environment variables on Travis, so we won't have to check them into source control) into the agent's
.m2/settings.xml
file. This is done as preparation for publishing to Maven Central (see here for a bit more context), which is then done in theafter_success.sh
script.However, it seems that
before_script.sh
,make_credentials.py
andafter_success.sh
are all redundant when using GH Actions. Thesetup-java@1
appears to support this exact XML fun out of the box.In Practice
What would replicating the full
.travis.yml
look like in GH actions, then?Like this: #1758
Note that in the current Travis-based version, every time Travis builds
master
thedeploy
lifecycle phase is being run. That means that on every merge to master, a deployment to Maven is made - regardless of an actual release.To be continued - If anyone has a bit of experience doing this type of migration, feel free to chime in. (@RahulKushwaha I'm looking at you :) )
The text was updated successfully, but these errors were encountered: