Prepare new release #69
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: "Prepare new release" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The version you want to release.' | |
required: true | |
jobs: | |
prepare-release: | |
name: Prepare release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.node-version' | |
- name: Create release branch | |
run: git checkout -b release/${{ github.event.inputs.version }} | |
- name: Initialize mandatory git config | |
uses: fregante/setup-git-user@v1 | |
- name: Bump version in package.json | |
run: yarn version --new-version ${{ github.event.inputs.version }} --no-git-tag-version | |
- name: Commit manifest files | |
id: make-commit | |
run: | | |
git add package.json | |
git commit --message "Prepare release ${{ github.event.inputs.version }}" | |
echo "::set-output name=commit::$(git rev-parse HEAD)" | |
- name: Publish release branch | |
run: git push origin release/${{ github.event.inputs.version }} | |
- name: Merge release into main branch | |
uses: thomaseizinger/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
head: release/${{ github.event.inputs.version }} | |
base: main | |
title: Merge release/${{ github.event.inputs.version }} into main branch | |
- name: Merge release into develop branch | |
uses: thomaseizinger/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
head: release/${{ github.event.inputs.version }} | |
base: develop | |
title: Merge release/${{ github.event.inputs.version }} into develop branch | |