-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (58 loc) · 2.02 KB
/
manually-triggered-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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# name: Manually triggered release
# on:
# workflow_dispatch:
# inputs:
# version:
# description: 'Please provide the version you want to release'
# default: '1.0.0'
# required: true
# pull_request:
# branches:
# - 'aj/release_test'
# jobs:
# Release_library_release_test:
# runs-on: macos-11
# steps:
# - name: Authorize user
# env:
# AUTHORIZED_USERS: "${{ secrets.AUTHORIZED_USERS }}"
# run: |
# if [[ " ${AUTHORIZED_USERS} " =~ " ${{ github.actor }} " ]]; then echo "::notice::User authorized!"; else echo "::error::Not authorized user to create release"; exit 1; fi
# - name: Check if user has admin access
# uses: lannonbr/[email protected]
# with:
# permission: admin
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Checkout branch
# uses: actions/checkout@v2
# with:
# ref: main
# token: ${{ secrets.GITHUB_TOKEN }}
# submodules: true
# - name: Setup git user
# run: |
# git config --global user.name "Artur Jankowski"
# git config --global user.email "[email protected]"
# - name: Print parameters
# run: |
# echo "Running release ${{ github.event_name }}!"
# echo "version: ${{ github.event.inputs.version }}!"
# - name: Setup - Ruby and bundler dependencies
# uses: ruby/setup-ruby@v1
# with:
# bundler-cache: true
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
# - name: Run fastlane release script
# run: |
# bundle exec fastlane ios release version:${{ github.event.inputs.version }} github_token:${{ secrets.RELEASE_TOKEN }}
# - name: Deploy to Cocoapods
# run: |
# set -eo pipefail
# pod lib lint --allow-warnings
# pod trunk push --allow-warnings
# env:
# COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}