diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9c0bb21..ada8795 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,21 +12,30 @@ jobs: runs-on: macOS-latest steps: + - name: Set env.BRANCH + run: echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)" >> $GITHUB_ENV + - name: Checkout repository uses: actions/checkout@v1 - - name: Deploy new release + - name: Deploy new patch release + if: "${{ contains(env.BRANCH, 'patch') }}" uses: maierj/fastlane-action@v1.4.0 with: - if: "${{ contains(github.event.commits[0].message, 'patch') }}" lane: release bump:patch - - if: "${{ contains(github.event.commits[0].message, 'minor') }}" + + - name: Deploy new minor release + if: "${{ contains(env.BRANCH, 'minor') }}" + uses: maierj/fastlane-action@v1.4.0 + with: lane: release bump:minor - - if: "${{ contains(github.event.commits[0].message, 'major') }}" + + - name: Deploy new major release + if: "${{ contains(env.BRANCH, 'major') }}" + uses: maierj/fastlane-action@v1.4.0 + with: lane: release bump:major - + env: APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}' DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}' diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b56cadd..1d797fb 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -43,6 +43,7 @@ def broadcast_message() key: "CFBundleShortVersionString" ) + build = get_info_plist_value( path: "#{APP_NAME}/Info.plist", key: "CFBundleVersion"