Skip to content

Instantly share code, notes, and snippets.

@hartlco

hartlco/release.yml

Created Mar 7, 2021
Embed
What would you like to do?
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