Skip to content

Draft new release

Draft new release #40

name: "Draft new release"
on:
workflow_dispatch:
inputs:
version:
description: 'The version you want to release.'
required: true
jobs:
draft-new-release:
name: "Draft a new release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.version }}
- name: Update changelog
uses: thomaseizinger/[email protected]
with:
version: ${{ github.event.inputs.version }}
- name: Initialize mandatory git config
run: |
git config user.name "GitHub actions"
git config user.email [email protected]
- name: Installing fractl-io dependancies
run: |
git clone https://${{ secrets.REPO_READ_WRITE_TOKEN }}@github.com/fractl-io/fractl-config-secrets-reader
cd fractl-config-secrets-reader
lein install
- name: Install dependencies
run: lein deps
- name: Commit changelog and manifest files
id: make-commit
run: |
git add CHANGELOG.md
git commit --message "Prepare release ${{ github.event.inputs.version }}"
echo "::set-output name=commit::$(git rev-parse HEAD)"
- name: Push new branch
run: git push --verbose origin release/${{ github.event.inputs.version }}
- name: Create pull request
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/${{ github.event.inputs.version }}
base: main
title: Release version ${{ github.event.inputs.version }}
assignees: ${{ github.actor }} # By default, we assign the person who triggered the workflow.
reviewers: ${{ github.actor }} # By default, we request a review from the person who triggered the workflow.
body: |
Hi,
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 updated the changelog and 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.