Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cI: Release Automation Step 1 #392

Merged
merged 12 commits into from
Jun 18, 2024
71 changes: 71 additions & 0 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: "Create Release PR"

on:
workflow_dispatch:
inputs:
versionNumber:
description: 'Version Number'
required: true

env:
BRANCH_NAME: "release/${{ github.event.inputs.versionNumber }}"
VERSION_NUMBER: ${{ github.event.inputs.versionNumber }}

jobs:
create-release-pr:
runs-on: macos-latest
timeout-minutes: 5
name: "Create Release PR"
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: main
- name: Setup SSH Keys
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: |
${{ secrets.APOLLO_IOS_DEV_DEPLOY_KEY }}
- name: Configure Git
uses: ./.github/actions/configure-git
- name: Get Previous Version
shell: bash
run: |
previousVersion=$(sh apollo-ios/scripts/get-version.sh)
echo "PREVIOUS_VERSION=$previousVersion" >> ${GITHUB_ENV}
- name: Set New Version
shell: bash
run: |
sh ./scripts/set-version.sh "${{ env.VERSION_NUMBER }}"
- name: Generate Documentation
shell: bash
run: |
cd SwiftScripts
swift run DocumentationGenerator
- name: Archive CLI
shell: bash
run: |
make archive-cli-to-apollo-package
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: ${{ env.BRANCH_NAME }}
commit-message: |
Setting up Release ${{ env.VERSION_NUMBER }}

Created By GitHub Action Workflow
title: |
Release ${{ env.VERSION_NUMBER }}
body: |
#### Diff
[See diff since last version](https://github.com/apollographql/apollo-ios-dev/compare/${{ env.PREVIOUS_VERSION }}...${{ github.sha }}).

#### Things to do in this PR
- [ ] Update [`CHANGELOG.md`](https://github.com/apollographql/apollo-ios/blob/main/CHANGELOG.md) with all relevant changes since the prior version. _Please include PR numbers and mention contributors for external PR submissions._

#### Things to do as part of releasing
- [ ] Add tag of format `major.minor.patch` to GitHub.
- [ ] Create a release on GitHub with the new tag, using the latest [`CHANGELOG.md`](https://github.com/apollographql/apollo-ios/blob/main/CHANGELOG.md) contents.
- [ ] Attach CLI binary to the GitHub release.
- [ ] Run `pod trunk push Apollo.podspec` and `pod trunk push ApolloTestSupport.podspec` to publish to CocoaPods. _You will need write permissions for this, please contact one of the [maintainers](https://github.com/apollographql/apollo-ios/blob/main/README.md#maintainers) if you need access to do this._
- [ ] Run "[Release New Version](https://github.com/apollographql/apollo-ios-xcframework/actions/workflows/release-new-version.yml)" workflow in `apollo-ios-xcframework`
Loading