-
Notifications
You must be signed in to change notification settings - Fork 65
45 lines (38 loc) · 1.21 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Release package
on:
push:
branches:
- main
jobs:
release:
name: Publish
runs-on: ubuntu-22.04
if: "startsWith(github.event.head_commit.message, 'chore: release')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get versions
id: versions
shell: bash
run: |
echo "RELEASE_VERSION=$(grep "s.version = " AlgoliaSearchClient.podspec | cut -d "'" -f2)" >> $GITHUB_OUTPUT
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.3
bundler-cache: true
- name: Install CocoaPods
run: gem install cocoapods
- name: Publish release on Github
run: |
set -eo pipefail
gh release create ${{ steps.versions.outputs.RELEASE_VERSION }} --title ${{ steps.versions.outputs.RELEASE_VERSION }} -F CHANGELOG.md --target ${{ github.sha }}
env:
GH_TOKEN: ${{ github.token }}
- name: Publish on CocoaPods
run: |
set -eo pipefail
pod trunk push --allow-warnings --verbose AlgoliaSearchClient.podspec
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}