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

automate release for cocoapods via github actions #105

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish-to-cocoapods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish-to-cocoapods

on:
release:
types: [published]

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Install Cocoapods
run: gem install cocoapods

- name: Publish to Cocoapods registry
run: |
set -eo pipefail
pod lib lint --allow-warnings
pod trunk push --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
RELEASE_VERSION: ${{ github.event.release.tag_name }}
5 changes: 4 additions & 1 deletion GRMustache.swift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
version = ENV["RELEASE_VERSION"]
fumito-ito marked this conversation as resolved.
Show resolved Hide resolved
exit 1 if version.to_s.empty?

Pod::Spec.new do |s|
s.name = 'GRMustache.swift'
s.version = '5.0.1'
s.version = version
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'Flexible Mustache templates for Swift.'
s.homepage = 'https://github.com/groue/GRMustache.swift'
Expand Down
Loading