ci: dont run actions if pr is draft" #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ios-deployment | |
on: | |
push: | |
branches: | |
- 'release/*' | |
- 'develop' | |
jobs: | |
check_draft: | |
runs-on: ubuntu-latest | |
outputs: | |
is_draft: ${{ github.event.pull_request.draft }} | |
steps: | |
- run: echo "checking PR status" | |
deploy: | |
needs: check_draft | |
if: github.event_name == 'push' && (github.event_name == 'pull_request' && needs.check_draft.outputs.is_draft != 'true') | |
runs-on: macos-latest | |
env: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} | |
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} | |
ASC_KEY_CONTENT: ${{ secrets.ASC_KEY_CONTENT }} | |
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.4' | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.1 | |
bundler-cache: true | |
- run: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
bundle exec fastlane ios beta | |
elif [[ "${{ github.event_name }}" == "push" ]]; then | |
bundle exec fastlane ios beta public:true | |
fi | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: appstore ipa & dsym | |
path: | | |
${{ github.workspace }}/fastlane/builds/flo.ipa | |
${{ github.workspace }}/fastlane/builds/flo.app.dSYM.zip |