Publish Release #9
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: "Publish Release" | |
on: | |
workflow_dispatch | |
jobs: | |
publish-release: | |
runs-on: macos-latest | |
name: Publish Release | |
steps: | |
# Checkout apollo-ios-dev repo | |
- name: Checkout apollo-ios-dev Repo | |
uses: actions/checkout@v4 | |
# Checkout apollo-ios repo | |
- name: Checkout apollo-ios Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: apollographql/apollo-ios | |
path: "checkout//apollo-ios" | |
ref: main | |
# Checkout apollo-ios-codegen repo | |
- name: Checkout apollo-ios-codegen Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: apollographql/apollo-ios-codegen | |
path: "checkout/apollo-ios-codegen" | |
ref: main | |
# Setup SSH Keys | |
- name: Setup SSH Keys | |
uses: webfactory/ssh-agent@v0.7.0 | |
with: | |
ssh-private-key: | | |
${{ secrets.APOLLO_IOS_DEPLOY_KEY }} | |
${{ secrets.APOLLO_IOS_CODEGEN_DEPLOY_KEY }} | |
${{ secrets.APOLLO_IOS_DEV_DEPLOY_KEY }} | |
# Configure Git | |
- name: Configure Git | |
uses: ./.github/actions/configure-git | |
# Get version | |
- name: Get Version | |
shell: bash | |
run: | | |
releaseVersion=$(sh apollo-ios/scripts/get-version.sh) | |
echo "RELEASE_VERSION=$releaseVersion" >> ${GITHUB_ENV} | |
# # Tag Dev, ios, and codegen repos | |
# - name: Tag Commits | |
# shell: bash | |
# run: | | |
# git tag ${{ env.RELEASE_VERSION }} | |
# git push --tags | |
# cd checkout/apollo-ios | |
# git tag ${{ env.RELEASE_VERSION }} | |
# git push --tags | |
# cd ../apollo-ios-codegen | |
# git tag ${{ env.RELEASE_VERSION }} | |
# git push --tags | |
# # Create Draft Release on GitHub with tag of version | |
# - name: Create Draft Release | |
# shell: bash | |
# run: | | |
# gh release create ${{ env.RELEASE_VERSION }} 'apollo-ios/CLI/apollo-ios-cli.tar.gz#apollo-ios-cli.tar.gz' -d --repo "apollographql/apollo-ios" | |
# env: | |
# GH_TOKEN: ${{ secrets.APOLLO_IOS_PAT }} | |
# Trigger "Release New Version" workflow in the apollo-ios-xcframework repo | |
# - name: Dispatch apollo-ios-xcframework | |
# shell: bash | |
# run: | | |
# gh workflow run release-new-version.yml -f remoteRef=${{ env.RELEASE_VERSION }} --repo "apollographql/apollo-ios-xcframework" | |
# env: | |
# GH_TOKEN: ${{ secrets.APOLLO_IOS_PAT }} | |
# Push Pods for Apollo iOS and Test Support | |
- name: Push Cocoapods | |
shell: bash | |
env: | |
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | |
run: | | |
export COCOAPODS_VALIDATOR_SKIP_XCODEBUILD=true:$PATH | |
gem install cocoapods | |
set -eo pipefail | |
cd apollo-ios | |
pod trunk push Apollo.podspec --allow-warnings | |
pod trunk push ApolloTestSupport.podspec --synchronous --allow-warnings |