Skip to content

Commit

Permalink
workflows(release): build and release for iOS (part of #42)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfroeller committed Jun 12, 2024
1 parent 3f9a717 commit 1713ffb
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 3 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: propromo.ios CD

on:
workflow_run:
workflows: ["propromo.ios CI"]
types:
- completed

permissions: write-all

jobs:
release:
runs-on: macos-latest

steps:
- name: Info
run: echo "Release Workflow - IOS App"

- name: Checkout Code
uses: actions/checkout@v4

- name: Install Dependencies
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install xcodegen
- name: Generate Project
run: xcodegen generate

- name: Xcode Tests
uses: mxcl/xcodebuild@v2
with:
platform: iOS
action: build
code-coverage: false

- name: Generate release tag
id: generate_release_tag
uses: amitsingh-007/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
tag_template: "yyyy.mm.dd.i"

- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}
name: Release ${{ github.sha }}
body: Release for commit '${{ github.event.workflow_run.head_commit.message }}'
draft: false
prerelease: true
makeLatest: true
# files: |
# xxx
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- UiTests

steps:
- name: Info
run: echo "Test Workflow - IOS App"

- name: Checkout Code
uses: actions/checkout@v4

Expand All @@ -41,8 +44,8 @@ jobs:
run: xcodegen generate

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
# with:
# xcode-version: ${{ matrix.xcode }}

# Versions:
# https://xcodereleases.com/
Expand All @@ -54,6 +57,6 @@ jobs:
platform: ${{ matrix.platform }}
# swift: ${{ matrix.swift }}
action: test # `build`
code-coverage: false # default = `false`
code-coverage: true # default = `false`
warnings-as-errors: false # default = `false`
scheme: ${{ matrix.scheme }}

0 comments on commit 1713ffb

Please sign in to comment.