Skip to content

Commit c04b141

Browse files
committed
Add release action
1 parent f27133f commit c04b141

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
jobs:
7+
build:
8+
runs-on: macos-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
path: mage-ios
15+
- name: Clone MAGE SDK
16+
uses: actions/checkout@master
17+
with:
18+
repository: ngageoint/mage-ios-sdk
19+
path: 'mage-ios-sdk'
20+
fetch-depth: 0
21+
- name: Install Utilities
22+
run: |
23+
brew install automake
24+
brew install libtool
25+
- name: Install Dependencies
26+
run: |
27+
gem install xcodeproj
28+
working-directory: mage-ios
29+
- name: Configure Signing Certificate and Provisioning Profiles
30+
run: |
31+
gpg --quiet --batch --yes --decrypt --passphrase="${{ secrets.CERTIFICATE_PASSPHRASE }}" --output development.p12 ./.github/secrets/development.p12.gpg
32+
gpg --quiet --batch --yes --decrypt --passphrase="${{ secrets.PROFILE_PASSPHRASE }}" --output MAGE.mobileprovision ./.github/secrets/MAGE.mobileprovision.gpg
33+
working-directory: mage-ios
34+
- name: Checkout Application Branch
35+
run: git checkout ${{ github.event.inputs.appBranch }}
36+
working-directory: mage-ios
37+
- name: Install Pods
38+
run: |
39+
pod repo update
40+
pod install
41+
working-directory: mage-ios
42+
- name: Build
43+
env:
44+
KEYCHAIN_NAME: "${{ secrets.KEYCHAIN_NAME }}"
45+
KEYCHAIN_PASSWORD: "${{ secrets.KEYCHAIN_PASSWORD }}"
46+
CERTIFICATE_PASSWORD: "${{ secrets.CERTIFICATE_PASSWORD }}"
47+
run: |
48+
fastlane build
49+
working-directory: mage-ios
50+
- name: Bundle Artifacts
51+
run: |
52+
tar -czvf MAGE.xcarchive.tar.gz MAGE.xcarchive/
53+
working-directory: mage-ios/build
54+
- name: Get Upload URL
55+
id: url
56+
run: |
57+
url="https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${GITHUB_REF#refs/tags/}"
58+
echo ::set-output name=upload_url::$(curl -sL $url | jq -r '.upload_url')
59+
- name: Upload Artifacts
60+
uses: actions/upload-release-asset@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
upload_url: ${{ steps.url.outputs.upload_url }}
65+
asset_path: mage-ios/build/MAGE.xcarchive.tar.gz
66+
asset_name: MAGE.xcarchive.tar.gz
67+
asset_content_type: application/octet-stream

fastlane/Fastfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ platform :ios do
5151
output_name: "MAGE",
5252
output_directory: "build",
5353
build_path: "build",
54+
archive_path: "build/MAGE.xcarchive",
5455
xcargs: "DEVELOPMENT_TEAM=ZL8G5D9G2H CODE_SIGN_STYLE=Manual",
5556
export_method: "development",
5657
export_team_id: "ZL8G5D9G2H",

0 commit comments

Comments
 (0)