Skip to content

Commit

Permalink
automate release for cocoapods via github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fumito-ito committed Oct 26, 2024
1 parent e32b95a commit 4f96dc3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
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"]
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

0 comments on commit 4f96dc3

Please sign in to comment.