-
Notifications
You must be signed in to change notification settings - Fork 58
90 lines (79 loc) · 2.82 KB
/
publish-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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/[email protected]
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
uses: ./.github/actions/repo-dispatch
with:
access-token: ${{ secrets.APOLLO_IOS_PAT }}
repo: "apollo-ios-xcframework"
client-payload: "{\"event_type\":\"release-new-version\",\"client_payload\":{\"versionNumber\":\"${{ env.RELEASE_VERSION }}\"}}"
# Push Pods for Apollo iOS and Test Support
- name: Push Cocoapods
shell: bash
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
gem install cocoapods
set -eo pipefail
cd apollo-ios
pod trunk push Apollo.podspec
pod trunk push ApolloTestSupport.podspec