Merge pull request #352 from tangem/release/3.10.0 #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | |
}); |