Skip to content

Commit

Permalink
test-prepare-release
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt committed Aug 13, 2024
1 parent acb58f6 commit 6c77cd9
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/test-prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Test Prepare Release

on:
workflow_dispatch:
inputs:
branch:
description: the branch from which the release will be created
required: false
type: string
default: main
version:
description: the version number in the `x.y.z` form
required: true
type: string

jobs:
Prepare-Release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}

- name: set release type
shell: bash
run: |
type=release
if [[ ${{ inputs.branch }} != "main" ]]
then
type=bugfix
fi
echo "type=$type" >> $GITHUB_OUTPUT
- shell: bash
run: |
# updates the project version
sed -i 's#^version=.*#version=${{ inputs.version }}#g' $(find . -name "gradle.properties")
# updates the eventual core library version in the version catalog
sed -i 's#^edc = .*#edc = "${{ inputs.version }}"#g' gradle/libs.versions.toml
- name: Create branch
run: |
git config user.name "eclipse-edc-bot"
git config user.email "[email protected]"
git checkout -b prepare/${{ inputs.version }}
git add .
git commit -m "Prepare ${{ steps.vars.outputs.type }} ${{ inputs.version }}"
git push origin prepare/${{ inputs.version }}
- name: Create pull request
uses: thomaseizinger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: prepare/${{ inputs.version }}
base: ${{ steps.vars.outputs.type }}/${{ inputs.version }}
title: Prepare ${{ steps.vars.outputs.type }} ${{ inputs.version }}
reviewers: ${{ github.actor }}
body: |-
This PR was created in response to a manual trigger of the prepare release.
Versions have been bumped in to ${{ inputs.version }}.
Merging this PR will create and run a release workflow

0 comments on commit 6c77cd9

Please sign in to comment.