Refined-github: Setup auto-publishing for Safari version

Created on 25 Oct 2020  路  19Comments  路  Source: sindresorhus/refined-github


Issuehunt badges

Refined GitHub is now also compatible with Safari (https://github.com/sindresorhus/refined-github/pull/3677), but it's not available on the App Store nor it's signed.

We need your help to:

How to build

  1. Install XCode 12 and Safari 14
  2. In Safari, enable Allow Unsigned Extensions in the Develop menu.
  3. Run:

    npm install
    npm run build
    npm run pack:safari
    npm run start:safari
    
  4. In Safari, click on the extension icon while on GitHub.com to enable it.




IssueHunt Summary

Backers (Total: $40.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips


Funded on Issuehunt Please! 鈾ワ笌 help wanted meta safari

Most helpful comment

Apple rejected the extension because "GitHub" is a trademarked name. We are working with GitHub on getting it approved. It will probably be another month until it's in the store though.

All 19 comments

@darthshadow has funded $10.00 to this issue.


@fregante has funded $10.00 to this issue.


@lautis would you like to copy your fastlane setup to this repo?

I think that the Safari version might need some changes to manifest.json, so feel free to copy the distribution folder to distribution-safari in a build step if necessary.

can pick this up in the morning if that's ok

Yes please!

Hey guys just finished reading the docs for fastlane and the great work over at lautis/refined-github-safari/fastlane

So far I have 1 issue related to certificates - looking at docs.fastlane.tools/actions/match I believe sharing a provisioning profile would reduce the safari github action to:

npm run build
bundle exec fastlane sign

Due to limitations I understand the appstore lane should be on a manual trigger to avoid potential double submit ?

If match is not appealing (overhead) the other simple solution would be to set up a CI machine with a temporary application password. I value this approach because it enables rapid development on a beta/staging lane with hardcoded Appfile values as described in docs.fastlane.tools/advanced/Appfile

While the above methods are friendly enough for non-apple developers to contribute on the extension, my main motivation is keeping the workflow logic (setting up ruby, node, auth and running commands) separated from fastlane and app store flows.

If that sounds good I would be happy to move forward with a CI provisioning profile and automated github action builds for a pre-production environment - this can be used as an artifact to solve spam lagging app store releases or just compare with live version.

TL;DR: Apple release process can be hacked quickly but I am not experienced enough in solving the credentials issue :D

Happy to know your thoughts !

Will Safari version support macOS 10.14 Mojave? Hope so! Thanks.

Yes, if you have Safari 14.

Thank you!

If match is not appealing (overhead) the other simple solution would be to set up a CI machine with a temporary application password. I value this approach because it enables rapid development on a beta/staging lane with hardcoded Appfile values as described in docs.fastlane.tools/advanced/Appfile

I prefer the CI machine approach. I would like the simplest setup possible.

An anonymous user has funded $20.00 to this issue.


Got this working locally without having to tick the "Allow Unsigned Extensions" box every time you launch Safari. Basically @fregante 's instructions above, then the self-signing instructions from https://stackoverflow.com/questions/62748163/how-can-i-sign-a-safari-extension-for-just-one-computer.

git clone https://github.com/sindresorhus/refined-github && cd refined-github

# The GitHub enterprise "allow on this website" bit wasn't working in Safari, so I edited distribution/manifest.json
# To change github.com to github.mycompany.com with:
# gsed -i 's/github.com/github.mycompany.com/g' distribution/manifest.json

npm install
npm run build
npm run pack:safari
npm run start:safari

# Open app in Xcode
open "safari/Refined GitHub.xcodeproj"

In Xcode:

  • Menu Bar -> Product -> Archive
  • Click "Distribute App"
  • Click "Development"
  • Sign in with Apple ID and register for the (free) developer account if you haven't already
  • Choose <Me> (Personal Team)
  • Automatically manage signing
  • Export
  • Save to somewhere, e.g. ~/tmp
  • Close Xcode

Outside of Xcode:

  • Move the app inside the folder you just exported to /Applications, e.g. mv ~/tmp/Refined GitHub*/Refined GitHub.app /Applications
  • Open the app: open /Applications/Refined GitHub.app
  • Click the button on the app when it opens to open Safari extension preferences.
  • Enable app in preferences.
  • Open your github homepage, click the app in the Safari URL bar, click "Allow always for this website"

Then everything started working for me.

To get Fastlane configured, we will need to provide Apple ID developer credentials. Is it safe to assume that the project maintainer (@sindresorhus), or a collaborator @sindresorhus trusts and specifically delegates to should handle this?

I just fixed some issues in the Safari version due to my dependencies, but I haven't updated them here yet.

Any news on this issue?
I am using a self-built version, but I am looking forward to the official release.
image

Apple rejected the extension because "GitHub" is a trademarked name. We are working with GitHub on getting it approved. It will probably be another month until it's in the store though.

@sindresorhus you can rephrase it as "Refined for GitHub" in the App Store listing. The app file can keep the Refined GitHub name.

I had this years ago with a stats viewer for Mario Kart 8, I originally called it "Mario Kart 8 Combo Explorer" but in the end I had to call it "Combo Explorer for Mario Kart 8" under the advice of Apple App Store staff. There are lots of examples of this sort of thing on the store, search "for".

eg.

Of course there are also a bunch of apps that use GitHub in the normal way without issue!

Right, but we are getting the approval, so it鈥檚 just a matter of waiting.

If that's the case it wasn't clear from Sindre's post, which was less definite.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sompylasar picture sompylasar  路  3Comments

pawelad picture pawelad  路  3Comments

vanniktech picture vanniktech  路  3Comments

hkdobrev picture hkdobrev  路  3Comments

mareksuscak picture mareksuscak  路  3Comments