-
Notifications
You must be signed in to change notification settings - Fork 60
53 lines (51 loc) · 1.5 KB
/
deployment.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
46
47
48
49
50
51
52
53
name: Deployment
on:
push:
tags:
- patch
- minor
- major
workflow_dispatch:
inputs:
release:
type: choice
description: Deploy new package release
options:
- patch
- minor
- major
jobs:
deploy:
runs-on: macos-latest
env:
GITHUB_ACTION: ${{ github.action_path }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.17"
- name: Set release type environment
run: |
echo "RELEASE_TYPE=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
if [[ "$RELEASE_TYPE" != "patch" && "$RELEASE_TYPE" != "minor" && "$RELEASE_TYPE" != "major" ]]; then
echo "RELEASE_TYPE=${{ github.event.inputs.release }}" >> $GITHUB_ENV
fi
- name: Check out polyglot
uses: actions/checkout@v2
with:
repository: algolia/polyglot
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: Install polyglot
run: |
make install
export PATH="$GOPATH/bin:$PATH"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7.2"
bundler-cache: true
- name: Deploy library release
run: bundle exec fastlane deploy verbose:true type:${{ env.RELEASE_TYPE }} no_dry_run:true