Skip to content

Commit

Permalink
Merge pull request #40 from kiwix/feature/re-use-cd-from-main
Browse files Browse the repository at this point in the history
Validation added
  • Loading branch information
BPerlakiH authored Jan 14, 2024
2 parents 1a3bfbd + 38b9c76 commit d630e8f
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Publish Custom App
on:
release:
types: [published]
branches:
- main
# branches: # TODO: uncomment this once all good
# - main

# taken from: kiwix/apple .github/workflows/cd.yml
env:
Expand All @@ -16,15 +16,14 @@ env:

jobs:
generate_build_deploy:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
destination:
- platform: macOS
- platform: iOS
xcode_extra: -sdk iphoneos

xcode_extra: -sdk iphoneos
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/validate_secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Validate if we have all secrets set for building

on:
pull_request:

jobs:
build:
runs-on: macos-13

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check if all required secrets were set
run:
|
if [ -z "${{ secrets.APPLE_DEVELOPMENT_SIGNING_CERTIFICATE }}" ]; then
echo "Error: APPLE_DEVELOPMENT_SIGNING_CERTIFICATE secret is not set."
else
echo "APPLE_DEVELOPMENT_SIGNING_CERTIFICATE is set."
fi
if [ -z "${{ secrets.APPLE_DEVELOPMENT_SIGNING_IDENTITY }}" ]; then
echo "Error: APPLE_DEVELOPMENT_SIGNING_IDENTITY secret is not set."
else
echo "APPLE_DEVELOPMENT_SIGNING_IDENTITY is set."
fi
if [ -z "${{ secrets.APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD }}" ]; then
echo "Error: APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD secret is not set."
else
echo "APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD is set."
fi
if [ -z "${{ secrets.APPLE_DISTRIBUTION_SIGNING_CERTIFICATE }}" ]; then
echo "Error: APPLE_DISTRIBUTION_SIGNING_CERTIFICATE secret is not set."
else
echo "APPLE_DISTRIBUTION_SIGNING_CERTIFICATE is set."
fi
if [ -z "${{ secrets.APPLE_DISTRIBUTION_SIGNING_P12_PASSWORD }}" ]; then
echo "Error: APPLE_DISTRIBUTION_SIGNING_P12_PASSWORD secret is not set."
else
echo "APPLE_DISTRIBUTION_SIGNING_P12_PASSWORD is set."
fi
if [ -z "${{ secrets.APPLE_SIGNING_ALTOOL_PASSWORD }}" ]; then
echo "Error: APPLE_SIGNING_ALTOOL_PASSWORD secret is not set."
else
echo "APPLE_SIGNING_ALTOOL_PASSWORD is set."
fi
if [ -z "${{ secrets.APPLE_SIGNING_ALTOOL_USERNAME }}" ]; then
echo "Error: APPLE_SIGNING_ALTOOL_USERNAME secret is not set."
else
echo "APPLE_SIGNING_ALTOOL_USERNAME is set."
fi
if [ -z "${{ secrets.APPLE_SIGNING_TEAM }}" ]; then
echo "Error: APPLE_SIGNING_TEAM secret is not set."
else
echo "APPLE_SIGNING_TEAM is set."
fi
if [ -z "${{ secrets.APPLE_STORE_AUTH_KEY }}" ]; then
echo "Error: APPLE_STORE_AUTH_KEY secret is not set."
else
echo "APPLE_STORE_AUTH_KEY is set."
fi
if [ -z "${{ secrets.APPLE_STORE_AUTH_KEY_ID }}" ]; then
echo "Error: APPLE_STORE_AUTH_KEY_ID secret is not set."
else
echo "APPLE_STORE_AUTH_KEY_ID is set."
fi
if [ -z "${{ secrets.APPLE_STORE_AUTH_KEY_ISSUER_ID }}" ]; then
echo "Error: APPLE_STORE_AUTH_KEY_ISSUER_ID secret is not set."
else
echo "APPLE_STORE_AUTH_KEY_ISSUER_ID is set."
fi
if [ -z "${{ secrets.DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION }}" ]; then
echo "Error: DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION secret is not set."
else
echo "DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION is set."
fi

0 comments on commit d630e8f

Please sign in to comment.