-
Notifications
You must be signed in to change notification settings - Fork 43
60 lines (52 loc) · 1.6 KB
/
publish-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
60
name: (A) Publish Release
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
merges:
name: Publish release
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Bundle Install
run: bundle install
- name: Prepare variables
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Create a release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
commitish: master
body_path: CHANGELOG
draft: false
prerelease: false
- 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 }}
- name: Create Pull request to master
uses: actions/github-script@v4
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head: "master",
base: "develop",
title: "Update develop branch with master after release",
});