Skip to content

Instantly share code, notes, and snippets.

@hartlco
Created March 7, 2021 14:21
Show Gist options
  • Save hartlco/34e6e3cc35221eb4bc5c30f86cbd20d1 to your computer and use it in GitHub Desktop.
Save hartlco/34e6e3cc35221eb4bc5c30f86cbd20d1 to your computer and use it in GitHub Desktop.
Release private Pods using GitHub Actions
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version (i.e. 1.1.3)'
required: true
name:
description: 'Name of the Version'
required: true
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Bundle Install
run: bundle install
- name: Add Pod Spec
run: pod repo add <NAME_OF_REPO> https://${{ secrets.GIT_ACTOR }}:${{ secrets.GIT_TOKEN }}@github.com/<ORG>/<REPO_NAME>.git
- name: Bump Podspec version
run: fastlane run version_bump_podspec path:"<NAME_OF_POD>.podspec" version_number:${{ github.event.inputs.version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: Release/${{ github.event.inputs.version }}
base: main
branch: Release/${{ github.event.inputs.version }}
body: |
Release: ${{ github.event.inputs.version }}
Changes:
- Bump version to ${{ github.event.inputs.version }}
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: Release/${{ github.event.inputs.version }}
tag_name: "${{ github.event.inputs.version }}"
release_name: "${{ github.event.inputs.version }}"
body: "${{ github.event.inputs.version }}"
commit-message: "Bump pod version"
- name: Push Pod Spec
run: pod repo push <NAME_OF_REPO> <NAME_OF_POD>.podspec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment