Skip to content

Commit 4f96dc3

Browse files
committed
automate release for cocoapods via github actions
1 parent e32b95a commit 4f96dc3

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: publish-to-cocoapods
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: macos-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
submodules: true
15+
16+
- name: Install Cocoapods
17+
run: gem install cocoapods
18+
19+
- name: Publish to Cocoapods registry
20+
run: |
21+
set -eo pipefail
22+
pod lib lint --allow-warnings
23+
pod trunk push --allow-warnings
24+
env:
25+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
26+
RELEASE_VERSION: ${{ github.event.release.tag_name }}

GRMustache.swift.podspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
version = ENV["RELEASE_VERSION"]
2+
exit 1 if version.to_s.empty?
3+
14
Pod::Spec.new do |s|
25
s.name = 'GRMustache.swift'
3-
s.version = '5.0.1'
6+
s.version = version
47
s.license = { :type => 'MIT', :file => 'LICENSE' }
58
s.summary = 'Flexible Mustache templates for Swift.'
69
s.homepage = 'https://github.com/groue/GRMustache.swift'

0 commit comments

Comments
 (0)