Merge remote-tracking branch 'refs/remotes/origin/master' #220
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: Deploying | |
on: | |
push: | |
branches: | |
- master | |
release: | |
types: [created] | |
jobs: | |
push_deploy_staging: | |
if: github.event_name == 'push' | |
name: Deploying to Testflight for Staging | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
env: | |
token: ${{ secrets.GITHUB_TOKENN }} | |
- name: Get version from date | |
run: | | |
echo "::set-output name=VERSION::$(date +'%Y.%-m.%-d')" | |
id: dateversion | |
- name: Get commits count | |
run: | | |
echo "::set-output name=GIT_COMMIT_NUMBER::$(git rev-list --count HEAD)" | |
id: commits | |
- name: Set version and build number | |
run: | | |
agvtool new-marketing-version ${{steps.dateversion.outputs.VERSION}} | |
agvtool new-version -all ${{steps.commits.outputs.GIT_COMMIT_NUMBER}} | |
- name: Install gpg | |
run: brew install gpg | |
- name: Setup provisioning profile | |
env: | |
IOS_KEYS: ${{ secrets.IOS_KEYS }} | |
run: .github/secrets/decrypt_secrets.sh | |
- name: Archiving project | |
env: | |
PR_NUMBER: $(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | |
run: .github/scripts/archive_staging_app.sh | |
- name: Exporting .ipa | |
run: .github/scripts/export_ipa.sh | |
- name: Publishing app | |
if: success() | |
env: | |
APPLEID_USERNAME: ${{ secrets.APPLEID_USERNAME }} | |
APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} | |
run: .github/scripts/publish_testflight.sh | |
release_deploy_production: | |
if: github.event_name == 'release' | |
name: Deploying to Testflight for Production | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
env: | |
token: ${{ secrets.GITHUB_TOKENN }} | |
- name: Get latest tag | |
run: | | |
echo "::set-output name=LATEST_TAG_NUMBER::$(git describe --tags `git rev-list --tags --max-count=1`)" | |
id: tags | |
- name: Get commits count | |
run: | | |
echo "::set-output name=GIT_COMMIT_NUMBER::$(git rev-list --count HEAD)" | |
id: commits | |
- name: Set version and build number | |
run: | | |
agvtool new-marketing-version ${{steps.tags.outputs.LATEST_TAG_NUMBER}} | |
agvtool new-version -all ${{steps.commits.outputs.GIT_COMMIT_NUMBER}} | |
- name: Install gpg | |
run: brew install gpg | |
- name: Setup provisioning profile | |
env: | |
IOS_KEYS: ${{ secrets.IOS_KEYS }} | |
run: .github/secrets/decrypt_secrets.sh | |
- name: Archiving project | |
env: | |
PR_NUMBER: $(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | |
run: .github/scripts/archive_production_app.sh | |
- name: Exporting .ipa | |
run: .github/scripts/export_ipa.sh | |
- name: Publishing app | |
if: success() | |
env: | |
APPLEID_USERNAME: ${{ secrets.APPLEID_USERNAME }} | |
APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} | |
run: .github/scripts/publish_testflight.sh | |
version-update: | |
if: github.event_name == 'release' | |
name: Version increment | |
runs-on: macOS-latest | |
needs: [release_deploy_production] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
env: | |
token: ${{ secrets.GITHUB_TOKENN }} | |
- name: Get version from releases | |
run: | | |
echo "::set-output name=LATEST_TAG_NUMBER::$(git describe --tags `git rev-list --tags --max-count=1`)" | |
id: tagversion | |
- name: Get commits count | |
run: | | |
echo "::set-output name=GIT_COMMIT_NUMBER::$(git rev-list --count HEAD)" | |
id: commits | |
- name: Set version and build number | |
run: | | |
agvtool new-marketing-version ${{steps.tagversion.outputs.LATEST_TAG_NUMBER}} | |
agvtool new-version -all ${{steps.commits.outputs.GIT_COMMIT_NUMBER}} | |
- name: update | |
run: | | |
git add . | |
git commit -m "bump version" | |
git push origin HEAD:master |