styles icon indicating copy to clipboard operation
styles copied to clipboard

Release?

Open bwiernik opened this issue 1 year ago • 13 comments

Are we expecting automatic release tags with each commit?

https://github.com/citation-style-language/styles/releases/tag/v0.0.1

@retorquere @adam3smith

bwiernik avatar Jul 05 '22 14:07 bwiernik

No, just a publish when merge to main happens.

retorquere avatar Jul 05 '22 14:07 retorquere

Isn't this part of the new Composer integration?

adam3smith avatar Jul 05 '22 14:07 adam3smith

Wait, I'd missed that. So every merge to main would get a new tag bump? Why do we want that?

retorquere avatar Jul 05 '22 14:07 retorquere

As I understand it, composer needs some type of versioning and since we're versioning in branches, this won't hurt (otoh, I also would not mind something less visible)

adam3smith avatar Jul 05 '22 15:07 adam3smith

It's more that for my projects, a push to master is never automatically a new release. A release is a deliberate step.

retorquere avatar Jul 05 '22 17:07 retorquere

But what is a new release in the context of the style repository? If you want to stay up-to-date with the styles, doesn't this make the most sense?

adam3smith avatar Jul 05 '22 17:07 adam3smith

I don't know, honestly. If that's what works for the style repo I'm good. I would usually want to have an answer to

what is a new release in the context of the style repository?

before implementing it.

retorquere avatar Jul 05 '22 17:07 retorquere

I would want to avoid the GitHub release system if possible. That's a lot of tags, and I don't see the point in numbering them. It's also really distracting in the notification feed.

The only thing we had previously discussed using the the release system for in the past was tagging the final compatible version of the repo after a new CSL release, but we decided to use branches for that instead.

bwiernik avatar Jul 05 '22 19:07 bwiernik

The GH release system is separate from the tags though.

retorquere avatar Jul 05 '22 20:07 retorquere

I don't know enough about composer to say what the minimal thing we can do to make this happen. I'd hope that tagging but not releasing would be sufficient, but not sure. Looping in @seboettg and @hxdef (FWIW, the original request to do this dates 5 years back and the merged PR was under review for 1 year)

adam3smith avatar Jul 05 '22 20:07 adam3smith

Hi @adam3smith Thank you for taking care of this! Composer/Packagist needs tags on Github in order to point a specific snapshot of the repo.

I added an entry in packagist for the styles repo and I was able to include the styles repository as an requirement into citeproc-php. That works fine so far 👍

...
    "require": {
        "citation-style-language/styles": "0.0.*",
        ...
    }
...

Beside that we need to set a github hook in order to enable packagist to recognize changes in the repo.

grafik

On https://packagist.org/about#how-to-update-packages I found the following information:

Enabling the Packagist service hook ensures that your package will always be updated instantly when you push to GitHub.

Do not want to log in via GitHub and grant us webhook configuration access?

You can configure a GitHub webhook manually by using the following values:

Payload URL: https://packagist.org/api/github?username=seboettg Content Type: application/json Secret: your Packagist API Token Which events? Just the push event is enough.

I could email you the packagist token from my packagist account and you would then have to set the github hook accordingly.

seboettg avatar Aug 16 '22 11:08 seboettg

By the way citeproc-php needs also a composer.json file in the locale repository :)

seboettg avatar Aug 16 '22 11:08 seboettg

@seboettg -- I have given packagist Webhook access for CSL and added you to the CSL organization (without any added permissions) -- could you see if that is enough for you to enable updating automatically via webhook? If it is, great, if not, let's go the manual way.

adam3smith avatar Sep 30 '22 03:09 adam3smith

I'm also interested in this, but it seems like tags already are being created?

Screen Shot 2023-01-03 at 9 28 13 AM

bkosborne avatar Jan 03 '23 14:01 bkosborne

Yeah, I think the last remaining action here is on the composer end @seboettg -- have you had a chance to look at this?

adam3smith avatar Jan 03 '23 14:01 adam3smith

Just tested this with composer and it works as expected. This can be closed as fixed.

composer require citation-style-language/styles:0.0.149 downloads the latest tag. The other tag versions work as well.

bkosborne avatar Jan 06 '23 19:01 bkosborne

https://packagist.org/packages/citation-style-language/styles does say it's not auto-updating, though, which is confusing.

adam3smith avatar Jan 06 '23 19:01 adam3smith