Skip to content

Commit

Permalink
Merge pull request #866 from 3a4oT/carthage-assets-release-upload
Browse files Browse the repository at this point in the history
Generate binary framework for Carthage users.
  • Loading branch information
robb committed Sep 20, 2020
2 parents 35ad71e + 261ef4f commit 454fbde
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 11 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/carthage-artifact-release-upload.yml
@@ -0,0 +1,42 @@
name: Carthage Artifact Upload

on:
push:
tags:
- '*'

jobs:
build:
name: Upload Release Asset
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
FRAMEWORK_NAME: Mantle
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build & archive framework with Carthage
run: carthage build --no-skip-current && carthage archive

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./${{ FRAMEWORK_NAME }}.framework.zip
asset_name: ${{ FRAMEWORK_NAME }}.framework.zip
asset_content_type: application/zip
@@ -1,10 +1,31 @@
name: xcodebuild

on: [push]
name: CI (pull-requests-only)

on:
pull_request:
branches:
- master

jobs:
build:
Carthage-Build:
env:
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
name: Carthage Build
runs-on: macOS-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v2

- name: Update submodules
run: git submodule update --init --recursive

- name: Verify Carthage build
run: carthage build --no-skip-current

Tests:
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer

strategy:
matrix:
Expand All @@ -27,12 +48,8 @@ jobs:
destination: "name=Apple Watch Series 4 - 40mm"

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Updating submodules
run: git submodule update --init --recursive
- name: Select Xcode Version
run: sudo xcode-select -s '/Applications/Xcode_11.2.app/Contents/Developer'
- name: Show Xcode version
run: xcodebuild -version
- name: Build
run: xcodebuild ${{ matrix.config.action }} -workspace Mantle.xcworkspace -scheme "${{ matrix.config.scheme }}" -sdk "${{ matrix.config.sdk }}" -destination "${{ matrix.config.destination }}" RUN_CLANG_STATIC_ANALYZER=NO
run: xcodebuild ${{ matrix.config.action }} -workspace Mantle.xcworkspace -scheme "${{ matrix.config.scheme }}" -sdk "${{ matrix.config.sdk }}" -destination "${{ matrix.config.destination }}" RUN_CLANG_STATIC_ANALYZER=NO
4 changes: 2 additions & 2 deletions Cartfile.resolved
@@ -1,3 +1,3 @@
github "Quick/Nimble" "v8.0.5"
github "Quick/Quick" "v2.2.0"
github "Quick/Nimble" "v8.1.2"
github "Quick/Quick" "v2.2.1"
github "jspahrsummers/xcconfigs" "1ef97639ffbe041da0b1392b2114fa19b922a7a1"

0 comments on commit 454fbde

Please sign in to comment.