Release - Step 1 -> Create release PR #18
This file contains hidden or 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 - 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 }}" |