release_02_create_github_release #6
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
#This workflow: | |
#1- Creates a new GitHub release with the desired release version | |
name: release_02_create_github_release | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release Version' | |
required: true | |
default: '0.0.0' | |
jobs: | |
tests: | |
name: release_create_github_release | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: "🤖 Select Xcode Version" | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: "🤖 Setup ruby" | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.0 | |
bundler-cache: true | |
- name: "🤖 Setup Fastlane" | |
run: | | |
bundle install | |
- name: "✏️ Get last created TAG" | |
id: get-last-tag | |
run: echo "::set-output name=LAST_TAG::$(git describe --tags $(git rev-list --tags --max-count=1))" | |
- name: "✏️ Generate changelog from last TAG" | |
id: get-changelog | |
run: | | |
bundle exec fastlane changelog tag:${{ steps.get-last-tag.outputs.LAST_TAG }} | |
- name: "✏️ Read changelog.txt" | |
id: changelog-file | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ./fastlane/changelog.txt | |
- name: "✏️ Print Changelog" | |
run: | | |
echo "${{ steps.changelog-file.outputs.content }}" | |
- name: "🚀 Create GH Release" | |
id: release | |
uses: zendesk/action-create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.event.inputs.version }} | |
release_name: Release ${{ github.event.inputs.version }} | |
body: | | |
${{ steps.changelog-file.outputs.content }} | |
draft: false | |
prerelease: false |