Skip to content

Commit

Permalink
[ci][cd] Updates for v7
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jun 2, 2021
1 parent b94bf39 commit 7233fda
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 37 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- Sources/**
- Tests/**
- .github/workflows/ci.yml
workflow_dispatch:
jobs:
auto-cancel:
runs-on: ubuntu-latest
Expand All @@ -14,23 +13,22 @@ jobs:

linux:
name: linux
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
matrix:
swift:
- 5.3
- 5.4
- 5.4-focal # Swift 5.4 requires llvm-cov v11
container:
image: swift:${{ matrix.swift }}
steps:
- uses: actions/checkout@v2
- run: swift test --enable-code-coverage --parallel --enable-test-discovery

- name: Generate Coverage Report
if: ${{ matrix.swift == '5.3' }} # 5.4 and above needs llvm-cov-12
run: |
apt-get -qq update
apt-get -qq install curl
apt-get -qq install curl # for codecov action 🙄
b=$(swift build --show-bin-path)
llvm-cov export \
-format lcov \
Expand Down
48 changes: 16 additions & 32 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,41 @@ on:
workflow_dispatch:
inputs:
version:
description: Version to publish
description: Version 🚀
required: true
jobs:
ci:
build:
runs-on: ubuntu-latest
strategy:
matrix:
swift:
- 5.3
- 5.4
container:
image: swift:${{ matrix.swift }}
steps:
- uses: aurelien-baudet/workflow-dispatch@v2
with:
workflow: CI
token: ${{ secrets.JAZZY_PAT }}
wait-for-completion: true
- uses: actions/checkout@v2
- run: swift build

lint:
runs-on: macos-10.15
runs-on: macos-latest
strategy:
matrix:
xcode:
- ^10
- ^11
- ^12
- '12.0'
- '12.4'
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- uses: actions/checkout@v2
with:
submodules: true
- run: pod lib lint --fail-fast

create-release:
runs-on: ubuntu-latest
needs: [ci, lint]
env:
v: ${{ github.event.inputs.version }}
needs: [lint, build]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # zero means “all” (or push fails)
- name: Update committed versions
run: |
ruby -i -pe "sub(/CURRENT_PROJECT_VERSION = [0-9.]+/, 'CURRENT_PROJECT_VERSION = $v')" PromiseKit.xcodeproj/project.pbxproj
ruby -i -pe "sub(/s.version = '[0-9.]+'/, 's.version = \'$v\'')" PromiseKit.podspec
- run: |
! (git diff --quiet)
- name: Commit
run: |
git config user.name github-actions
git config user.email [email protected]
git commit -am "PromiseKit $v"
git push
- uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -69,5 +54,4 @@ jobs:
workflow: CD
token: ${{ secrets.JAZZY_PAT }}
inputs: "{\"version\": \"${{ github.event.inputs.version }}\"}"
ref: master # or doesn’t use our new commit above
wait-for-completion: true
wait-for-completion: false

0 comments on commit 7233fda

Please sign in to comment.