From 35125e0646f0c90d2e8c4b9609079104bb38b273 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 19 Jun 2023 11:01:49 -0400 Subject: [PATCH] v8 --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 13 ++++----- .github/workflows/publish.yml | 27 +++++++++--------- README.md | 54 +++++------------------------------ 4 files changed, 27 insertions(+), 69 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 431325285..9f0bcafe8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -17,7 +17,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} env: pods - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8d91c970..b197323ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: CI + on: workflow_dispatch: pull_request: @@ -7,14 +8,13 @@ on: - Tests/** - .github/workflows/ci.yml - PromiseKit.xcodeproj/** -jobs: - auto-cancel: - runs-on: ubuntu-latest - steps: - - uses: technote-space/auto-cancel-redundant-job@v1 +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: linux: - needs: auto-cancel runs-on: ubuntu-latest strategy: matrix: @@ -31,7 +31,6 @@ jobs: linux-code-cov: name: linux - needs: auto-cancel runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 717bc7fc2..fb097272f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,33 +1,32 @@ name: Publish + on: workflow_dispatch: inputs: version: - description: Version to publish + description: semantic version to publish required: true + +concurrency: + group: publish-{{github.event.inputs.version}} + cancel-in-progress: true + jobs: ci: - runs-on: ubuntu-latest - steps: - - uses: aurelien-baudet/workflow-dispatch@v2 - with: - workflow: CI - token: ${{ secrets.JAZZY_PAT }} - wait-for-completion: true + uses: ./.github/workflows/ci.yml lint: - runs-on: macos-10.15 + runs-on: macos-latest strategy: matrix: xcode: - - ^10 - - ^11 - - ^12 + - ^13 + - ^14 steps: - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: ${{ matrix.xcode }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - run: pod lib lint --fail-fast --allow-warnings @@ -38,7 +37,7 @@ jobs: env: v: ${{ github.event.inputs.version }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # zero means “all” (or push fails) - name: Update committed versions diff --git a/README.md b/README.md index 9df675e2e..8688e5856 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,6 @@ pod used in many of the most popular apps in the world. [![codecov](https://codecov.io/gh/mxcl/PromiseKit/branch/master/graph/badge.svg)](https://codecov.io/gh/mxcl/PromiseKit) -# PromiseKit 6 - -[Release notes and migration guide][PMK6]. - # Quick Start In your [Podfile]: @@ -45,11 +41,13 @@ In your [Podfile]: use_frameworks! target "Change Me!" do - pod "PromiseKit", "~> 6.8" + pod "PromiseKit", "~> 8" end ``` -> The above gives an Xcode warning? See our [Installation Guide]. +PromiseKit 8 supports recent Xcodes (13+). Some Podspecs were +[dropped as a result](https://github.com/mxcl/PromiseKit/pull/1318). +Pull requests are welcome. PromiseKit 6, 5 and 4 support Xcode 8.3, 9.x and 10.0; Swift 3.1, 3.2, 3.3, 3.4, 4.0, 4.1, 4.2, 4.3 and 5.0 (development snapshots); iOS, macOS, @@ -73,20 +71,6 @@ tools. [Get Professional Support for PromiseKit with TideLift](https://tidelift.com/subscription/pkg/cocoapods-promisekit?utm_source=cocoapods-promisekit&utm_medium=referral&utm_campaign=readme). -# PromiseKit is Thousands of Hours of Work - -Hey there, I’m Max Howell. I’m a prolific producer of open source software and -probably you already use some of it (I created [`brew`]). I work full-time on -open source and it’s hard; currently *I earn less than minimum wage*. Please -help me continue my work, I appreciate it 🙏🏻 - - - - - -[Other ways to say thanks](http://mxcl.dev/#donate). - -[`brew`]: https://brew.sh # Documentation @@ -121,12 +105,12 @@ All our extensions are separate repositories at the [PromiseKit organization]. Then don’t have them: ```ruby -pod "PromiseKit/CorePromise", "~> 6.8" +pod "PromiseKit/CorePromise", "~> 8" ``` > *Note:* Carthage installations come with no extensions by default. -## Choose Your Networking Library +## Networking Promise chains commonly start with a network operation. Thus, we offer extensions for `URLSession`: @@ -155,32 +139,8 @@ func makeUrlRequest() throws -> URLRequest { } ``` -And [Alamofire]: - -```swift -// pod 'PromiseKit/Alamofire' # https://github.com/PromiseKit/Alamofire- - -firstly { - Alamofire - .request("http://example.com", method: .post, parameters: params) - .responseDecodable(Foo.self) -}.done { foo in - //… -}.catch { error in - //… -} -``` - -Nowadays, considering that: - -* We almost always POST JSON -* We now have `JSONDecoder` -* PromiseKit now has `map` and other functional primitives -* PromiseKit (like Alamofire, but not raw-`URLSession`) also defaults to having - callbacks go to the main thread +Support for Alamofire is welcome, please submit a PR. -We recommend vanilla `URLSession`. It uses fewer black boxes and sticks closer to the metal. Alamofire was essential until the three bullet points above -became true, but nowadays it isn’t really necessary. # Support