Skip to content

Commit 5dfad83

Browse files
algolia-botFluf22shortcuts
committed
feat(swift): release process
algolia/api-clients-automation#2864 Co-authored-by: Thomas Raffray <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent feb3724 commit 5dfad83

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)