sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Include the zipped extension in each release #3545

fregante posted onGitHub

Since #3421 added automatic releases, now we can also include the built extension for each release.

There are several actions that allow attaching files to releases, so we just need to ensure that they're compatible with our workflow, e.g.

    - name: Update extension’s meta
      env:
        VER: ${{ needs.Version.outputs.version }}
      run: |
        echo https://github.com/$GITHUB_REPOSITORY/tree/$VER > distribution/SOURCE_URL.txt
        npm run version
    - uses: actions/upload-artifact@v2
      with:
        path: distribution
+   - uses: *some action here*
+     with:
+       files:
+         - distribution
+       release: ${{ needs.Version.outputs.version }}
+       token: ${{ secrets.GITHUB_TOKEN }}

Perhaps this would be easier as a separate release.yml workflow with - on.push: [tags], but the automatic GITHUB_TOKEN doesn't trigger other workflows. If anyone knows knows a workaround (other than providing another token) please let us know.

posted by fregante over 4 years ago

we can also include the built extension for each release.

For what purpose?

posted by sindresorhus over 4 years ago

e.g. users wanting to test previous versions in Chrome without having to build the extension. Firefox hosts them on AMO (at least temporarily), but Chrome doesn't

posted by fregante over 4 years ago

@notlmn should this be part of https://github.com/notlmn/release-with-changelog?

posted by fregante over 4 years ago

@notlmn should this be part of https://github.com/notlmn/release-with-changelog

Or we could output release URL from that action, and use that to upload assets to the release using https://github.com/actions/upload-release-asset.

This is what https://github.com/actions/create-release does.

posted by notlmn over 4 years ago

So everything seems to exist already except the changelog creation. I see 2 solutions:

  • use GitHub’s 2 actions + a third one to generate the changelog
  • merge all functionality into one action

The first one would be preferred for stability (it’s 66% maintained by GitHub) but the workflow would be stupidly long apparently: https://github.com/actions/upload-release-asset#example-workflow---upload-a-release-asset

The second one doesn’t feel very UNIX-y… but it’d be very convenient. It could still import those 2 actions and still offer all of its inputs/outputs (but perhaps it wouldn’t make it any easier)

posted by fregante over 4 years ago

The other action don't export their functions actually for us to compose, which leaves having to implement all of it anyway.


If we were to merge all of it into a single action then from https://github.com/actions/upload-release-asset#example-workflow---upload-a-release-asset,

  • env and GITHUB_TOKEN can be dropped, as we already have token input
  • upload_url can be dropped, making it internal
  • asset_name can be dropped, using the filename itself (unless we want it to be something like refined-github-v20.4.9.zip or something)
  • asset_content_type, I'm not sure about this, mime sniff?

Going with the first option makes it easier for composing other actions. And also we will not be using @actions/create-release here as @notlmn/release-with-changelog already creates one.

posted by notlmn over 4 years ago

Resurfacing this one.

I pushed a demo commit (https://github.com/sindresorhus/refined-github/commit/cd7991b1334112d211425e9f7784dcbdcd0cf4c8) of the changes needed here. It's only missing:

PR(s) welcome

posted by fregante about 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests