Skip to content

Create Release PR

Create Release PR #17

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"
outputs:
new-output: ${{ steps.output-test.outputs.new-output }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- 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: Output Test
id: output-test
run: |
echo "new-output=9.9.1" >> "$GITHUB_OUTPUT"
# - name: Generate Documentation
# shell: bash
# run: |
# cd SwiftScripts
# swift run DocumentationGenerator
# - name: Archive CLI
# shell: bash
# run: |
# make archive-cli-to-apollo-package
# - name: Commit and Push Branch
# shell: bash
# run: |
# git checkout -b ${{ env.BRANCH_NAME }}
# git add -A
# git commit -m "Setting up Release ${{ env.VERSION_NUMBER }}"
# git push -u origin ${{ env.BRANCH_NAME }}
# - name: Create Pull Request
# uses: ./.github/actions/create-pr
# with:
# access-token: ${{ secrets.APOLLO_IOS_PAT }}
# repo: "apollographql/apollo-ios-dev"
# head-branch: "${{ env.BRANCH_NAME }}"
# reviewers: AnthonyMDev,calvincestari,bobafetters
# 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
# - [ ] Update and publish the draft release created by CI using the latest [CHANGELOG.md](https://github.com/apollographql/apollo-ios/blob/main/CHANGELOG.md) contents
publish-test:
if: success('create-release-pr') && startsWith(github.ref, 'refs/heads/release/')
needs: create-release-pr
runs-on: macos-latest
name: Publish Test
steps:
- name: Test
run: |
echo "Runnin publish release with ref: ${{ github.ref }} and output: ${{ needs.create-release-pr.outputs.new-output }}"