FYI - I implement it with https://github.com/tisonkun/ci-opendal. Just if
it helps anyone has the same question :D
Best,
tison.
tison 于2023年5月26日周五 11:33写道:
> Thank you Tamas!
>
> Then I follow Netty's practice and successfully run the automatically
> deploy[1][2].
>
> While there are still two issues, they may not be quite related in Maven
> domain:
>
> 1. Distribute Maven and GPG secrets - does Maven support token like
> password? I'm a bit concerned to convey my text password to even our INFRA
> member to configure a platform secret. Maybe I can just release locally,
> but right now I already use GitHub Actions to do multiple platform building
> and full automation seems reasonable to try.
> 2. Cross compile for different arch due to the lack of arm64 machine on
> GitHub Actions. Yes, this is totally unrelated to Maven then :D Maybe how
> to package two classifier with different config at once is, but there
> should be multiple workaround.
>
> Best,
> tison.
>
> [1]
> https://github.com/tisonkun/opendal/actions/runs/5082466604/jobs/9132438693
> [2] https://github.com/tisonkun/opendal/actions/runs/5082466604/workflow
>
>
>
> Tamás Cservenák 于2023年5月25日周四 20:23写道:
>
>> Howdy,
>>
>> Sonatype OSS and ASF Reposes are both Nx2 so the same applies:
>>
>> When you deploy for the first time, Nx2 staging creates a staging
>> repository that is "open".
>> The created repository will have its own ID and hence, own deployment URL
>> as well.
>>
>> The trick is that this endpoint:
>> ttps://repository.apache.org/service/local/staging/deploy/maven2
>> At the first request this endpoint creates a staging repo (on the fly) and
>> from that point on, it just routes the incoming request to it, as if those
>> requests would come in directly to the newly created repository.
>>
>> In Nx2 UI, when you click on Staging Repository -> your staging repo (as
>> you need permission as well to write there), the lower part of the screen
>> will tell you the URL of the staging repository.
>>
>> You can use authenticated HTTP requests (even using curl -X PUT and even
>> -X
>> DELETE) to MODIFY the content of your staging repository as you wish.
>>
>> Once the staging repository is closed, it is "untouchable", no content
>> changes are possible against it.
>>
>> So to answer your questions:
>> - maven will NOT allow you to perform multiple deploys (see similar
>> problem
>> https://issues.apache.org/jira/browse/MDEPLOY-118)
>> - but nothing stops you to use curl or even mvn deploy-file against your
>> (open) staging repository.
>>
>> At the end, there are "rule checks" that contents of staging repository
>> must pass (like presence of sources, javadoc, hashes and signatures). But
>> Nx2 will tell you if something is missing.
>>
>> HTH
>> Tamas
>>
>>
>>
>> On Thu, May 25, 2023 at 2:10 PM tison wrote:
>>
>> > Hi devs,
>> >
>> > I'm trying to deploy Apache OpenDAL with multiple platform artifacts on
>> its
>> > Java binding[1].
>> >
>> > Using the ASF Parent POM, I freely get a `mvn -P apache-relase deply`
>> > target to make the release - that is great!
>> >
>> > Although, every time when I execute this command, I can only release for
>> > one platform (the one the command runs on). I'd like to release for
>> > multiple platforms (said at least for (osx, linux) x (x86_64,
>> aarch_64)),
>> > but struggling that I can even build them on different machines.
>> >
>> > I don't know if I can -
>> > 1. Deploy multiple times for the same version;
>> > 2. Manually merge artifacts and finally upload those artifacts at once.
>> >
>> > Existing examples like Netty[2] work against the Sonatype repository,
>> while
>> > Apache OpenDAL, IIUC, should work against the ASF repository.
>> >
>> > Looking forward to your help!
>> >
>> > Best,
>> > tison.
>> >
>> > [1] https://github.com/apache/incubator-opendal/issues/2313
>> > [2] https://netty.io/wiki/releasing-new-version.html
>> >
>>
>