Skip to content

Release - Step 1 -> Create release PR #18

Release - Step 1 -> Create release PR

Release - Step 1 -> Create release PR #18

name: Release - Step 1 -> Create release PR
on:
workflow_dispatch:
inputs:
version:
description: 'Version number (semantic: major.minor.patch)'
required: true
changelogBase64:
description: 'Changelog (for last version only & base64 encoded)'
required: true
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0'
- name: Build .NET Release tool
run: dotnet build ./ReleaseTool/ReleaseTool.csproj
- name: Run .NET Release Tool
run: dotnet run --project ./ReleaseTool --version ${{ github.event.inputs.version }} --changelogBase64 "${{ github.event.inputs.changelogBase64 }}"
- name: Create Release Branch
run: |
git checkout -b release/${{ github.event.inputs.version }}
- name: Commit Changes
run: |
git config --global user.name 'Daniel Sierpiński'
git config --global user.email '[email protected]'
git add .
git commit -m "Release version ${{ github.event.inputs.version }}"
- name: Push Changes
run: |
git push origin release/${{ github.event.inputs.version }}
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "Release version ${{ github.event.inputs.version }}"
pr_body: "${{ env.CHANGELOG }}"
destination_branch: "main"
source_branch: "release/${{ github.event.inputs.version }}"