refined-github icon indicating copy to clipboard operation
refined-github copied to clipboard

Setup auto-publishing for Safari version

Open fregante opened this issue 5 years ago • 42 comments

Issuehunt badges

Outdated intro

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.

Safari users 👋

If you're looking to use Refined GitHub for Safari, for the time being it's best to use https://github.com/lautis/refined-github-safari

Xcode developers 👋

We need your help to:

  • [ ] Configure Fastlane: https://docs.fastlane.tools/getting-started/ios/appstore-deployment/
  • [ ] Setup the FastLane deployment action: https://github.com/marketplace/actions/fastlane-action

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.

You could also sign it locally following the instructions below: https://github.com/sindresorhus/refined-github/issues/3686#issuecomment-747455258


IssueHunt Summary

Backers (Total: $200.01)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

fregante avatar Oct 25 '20 01:10 fregante

@darthshadow has funded $10.00 to this issue.


issuehunt-oss[bot] avatar Nov 16 '20 11:11 issuehunt-oss[bot]

@fregante has funded $10.00 to this issue.


issuehunt-oss[bot] avatar Nov 16 '20 20:11 issuehunt-oss[bot]

@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.

fregante avatar Nov 16 '20 20:11 fregante

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

0-vortex avatar Nov 24 '20 03:11 0-vortex

Yes please!

fregante avatar Nov 24 '20 03:11 fregante

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 !

0-vortex avatar Nov 24 '20 22:11 0-vortex

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

gingerbeardman avatar Nov 27 '20 11:11 gingerbeardman

Yes, if you have Safari 14.

lautis avatar Nov 27 '20 12:11 lautis

Thank you!

gingerbeardman avatar Nov 27 '20 13:11 gingerbeardman

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.

sindresorhus avatar Nov 28 '20 03:11 sindresorhus

An anonymous user has funded $20.00 to this issue.


issuehunt-oss[bot] avatar Dec 12 '20 23:12 issuehunt-oss[bot]

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.

gibfahn avatar Dec 17 '20 13:12 gibfahn

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?

markdorison avatar Dec 17 '20 21:12 markdorison

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

  • https://github.com/fregante/webext-options-sync-per-domain/releases/tag/v2.0.2
  • https://github.com/fregante/webext-options-sync/releases/tag/v2.0.1

fregante avatar Dec 19 '20 06:12 fregante

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

L1cardo avatar Jan 08 '21 03:01 L1cardo

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 avatar Jan 08 '21 04:01 sindresorhus

@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.

  • Streaks for GitHub https://apps.apple.com/gb/app/streaks-for-github/id1274680634?mt=12
  • Duplicate Cleaner for iPhoto https://apps.apple.com/gb/app/duplicate-cleaner-for-iphoto/id586862299?mt=12
  • Sourcegraph for Safari https://apps.apple.com/gb/app/sourcegraph-for-safari/id1543262193?mt=12
  • Simplified for Twitter https://apps.apple.com/gb/app/simplified-for-twitter/id1479307973?mt=12
  • FreeChat for WhatsApp https://apps.apple.com/gb/app/freechat-for-whatsapp/id1084346074?mt=12

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

gingerbeardman avatar Jan 08 '21 12:01 gingerbeardman

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

fregante avatar Jan 08 '21 16:01 fregante

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

gingerbeardman avatar Jan 08 '21 23:01 gingerbeardman

An anonymous user has funded $10.00 to this issue.


issuehunt-oss[bot] avatar Feb 01 '21 14:02 issuehunt-oss[bot]

An anonymous user has funded $10.00 to this issue.


issuehunt-oss[bot] avatar Feb 18 '21 13:02 issuehunt-oss[bot]

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

Does anyone know how long it might take? Should I wait or just build & install myself?

ogirginc avatar Feb 26 '21 12:02 ogirginc

🔔

For the time being, everyone here is better off using https://github.com/lautis/refined-github-safari since it automatically updates via homebrew.

I also just followed @gibfahn’s instructions and created an official signed app of v21.3.5, but this lacks autoupdating so it's only good for testing. Download it from https://github.com/sindresorhus/refined-github/releases/tag/21.3.5

fregante avatar Mar 05 '21 06:03 fregante

I see that this test build 21.3.5 requires macOS 10.15 or higher.

It would be good if Safari 14 on macOS 10.14.6 could be supported, as previously mentioned: https://github.com/sindresorhus/refined-github/issues/3686#issuecomment-734803755

Thank you

gingerbeardman avatar Mar 05 '21 14:03 gingerbeardman

FWIW I've been happily using the one I built back in January without any issues. Yeah it's out of date now, but the small subset of features I actually use daily has been very solid.

gibfahn avatar Mar 08 '21 11:03 gibfahn

What's the latest on the Safari Extension App Store rollout?

gingerbeardman avatar Apr 07 '21 09:04 gingerbeardman

I'm happy to announce that it's finally available: https://apps.apple.com/app/id1519867270


Backstory: GitHub has been very helpful. They got their lawyers to draft up a trademark license agreement for the name REFINED GITHUB 👍

sindresorhus avatar Apr 10 '21 06:04 sindresorhus

Please let us know if anyone else encounters this issue: https://github.com/sindresorhus/refined-github/issues/4216

sindresorhus avatar Apr 10 '21 08:04 sindresorhus

Also question for new users: did the extension open https://github.com/sindresorhus/refined-github/issues/3543 on install?

fregante avatar Apr 10 '21 09:04 fregante

Also question for new users: did the extension open #3543 on install?

@fregante After enabling the extension in Safari Extensions Preferences, this page does not open for me.

rakleed avatar Apr 10 '21 10:04 rakleed