Release 1 - Initial New Release #2
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: "Release 1 - Initial New Release" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "The version you want to release." | |
required: true | |
default: "1.0.0" | |
jobs: | |
draft-new-release: | |
name: "Draft a new release" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create release branch | |
run: git checkout -b release/${{ github.event.inputs.version }} | |
- name: Initialize mandatory git config | |
run: | | |
git config user.name "GitHub actions" | |
git config user.email noreply@github.com | |
- 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 . | |
git commit --message "Bump version to ${{ github.event.inputs.version }}" | |
- name: Push new branch | |
run: git push origin release/${{ github.event.inputs.version }} | |
- name: Create pull request | |
uses: thomaseizinger/create-pull-request@1.4.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
head: release/${{ github.event.inputs.version }} | |
base: develop | |
title: Release version ${{ github.event.inputs.version }} | |
reviewers: ${{ github.actor }} #Assign the PR to the user who triggered the release | |
# team-reviewers: | | |
# developers | |
# qa-team | |
body: | | |
Hi @${{ github.actor }}! | |
This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}. | |
I've bumped the versions in the manifest files in this commit: ${{ steps.make-commit.outputs.commit }}. | |
Merging this PR will create a GitHub release and upload any assets that are created as part of the release build. | |
Happy merging! |