Created
March 7, 2021 14:21
-
-
Save hartlco/34e6e3cc35221eb4bc5c30f86cbd20d1 to your computer and use it in GitHub Desktop.
Release private Pods using GitHub Actions
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: 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