Skip to content

Commit

Permalink
github: add build action
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Sep 29, 2021
1 parent dbd87e0 commit 16e0874
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build
on:
push:
branches:
- 'main'
- 'dev'
tags-ignore:
- '**'
paths-ignore:
- 'LICENSE'
- '**.md'
pull_request:
release:
types: [created]
workflow_dispatch:
inputs:
test_release:
description: 'Test release?'
required: true
default: 'false'

jobs:
build-ios:
name: Build IPA
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build
run: xcodebuild archive -archivePath PurpleHaze -scheme "Purple Haze" -configuration Release CODE_SIGNING_ALLOWED=NO
- name: Fake Sign
run: |
sed 's/$(PRODUCT_BUNDLE_PREFIX:default=com.osy86)/com.osy86/g' PurpleHaze/PurpleHaze.entitlements > PurpleHaze.entitlements
sed 's/$(PRODUCT_BUNDLE_PREFIX:default=com.osy86)/com.osy86/g' Extension/Iodine.entitlements > Iodine.entitlements
codesign --force --sign - --entitlements "Iodine.entitlements" --timestamp=none "PurpleHaze.xcarchive/Products/Applications/Purple Haze.app/PlugIns/Iodine.appex"
codesign --force --sign - --entitlements "PurpleHaze.entitlements" --timestamp=none "PurpleHaze.xcarchive/Products/Applications/Purple Haze.app"
- name: Compress
run: tar cf PurpleHaze.xcarchive.tgz PurpleHaze.xcarchive
- name: Upload
uses: actions/upload-artifact@v2
with:
name: PurpleHaze
path: PurpleHaze.xcarchive.tgz
package-ipa:
name: Package IPA
runs-on: ubuntu-20.04
needs: build-ios
if: github.event_name == 'release' || github.event.inputs.test_release == 'true'
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: PurpleHaze
- name: Package IPA
run: |
tar xf PurpleHaze.xcarchive.tgz
mv PurpleHaze.xcarchive/Products/Applications Payload
zip -r PurpleHaze.ipa Payload -x "._*" -x ".DS_Store" -x "__MACOSX"
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: PurpleHaze.ipa
asset_name: PurpleHaze.ipa
asset_content_type: application/octet-stream
- name: Send Dispatch Event
if: github.event_name == 'release'
continue-on-error: true
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repository: ${{ secrets.DISPATCH_ALTSTORE_REPO_NAME }}
event-type: new-release

0 comments on commit 16e0874

Please sign in to comment.