diff --git a/.github/project.yml b/.github/project.yml index 0b1aa71f2..5fc544e9e 100644 --- a/.github/project.yml +++ b/.github/project.yml @@ -1,4 +1,4 @@ name: Quarkus QE Test Framework release: - current-version: 1.4.2.Beta8 - next-version: 1.4.3.Beta8 + current-version: 1.4.2.Beta9 + next-version: 1.4.3.Beta2 diff --git a/.github/workflows/check-release-version.yml b/.github/workflows/check-release-version.yml new file mode 100644 index 000000000..189008a7f --- /dev/null +++ b/.github/workflows/check-release-version.yml @@ -0,0 +1,35 @@ +name: Check release version +on: + push: + paths: + - .github/project.yml +jobs: + check-release-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check release version + run: | + release=$(curl -sSL "https://github.com/gitapi/repos/${GITHUB_REPOSITORY}/releases/latest" | jq -r .tag_name) + release_subversion=$(echo "$release" | cut -d"." -f3,3) + release_stage_number=$(echo "$release" | cut -d"." -f4,4 | grep -o '[0-9]' || true) + + next_version=$(grep -E 'current-version:\s*' .github/project.yml | awk '{print $2}') + next_version_subversion=$(echo "$next_version" | cut -d"." -f3,3) + next_version_stage_number=$(echo "$next_version" | cut -d"." -f4,4 | grep -o '[0-9]' || true) + + if ! [[ $release =~ .*Final$ ]]; then + if [[ $next_version_subversion > $release_subversion ]]; then + echo "Error: you are bumping the FW sub version when the previous release was not Final" + exit 1; + fi + if [[ $next_version_stage_number != $(("$release_stage_number" + 1)) ]]; then + echo "Error: release stage numbers should go in sequence" + exit 1; + fi + else + if [[ $(("$release_subversion" + 1)) != $next_version_subversion || ($next_version_stage_number != 1) ]]; then + echo "Error: release sub versions should go in sequence" + exit 1; + fi + fi \ No newline at end of file diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml deleted file mode 100644 index 135c28a47..000000000 --- a/.github/workflows/release-notes.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Release notes -on: - workflow_dispatch: - milestone: - types: [closed] - push: - branches: - - main -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v6 - with: - config-name: upstream-release-drafter.yml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 76cc4af25..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Release - -on: - pull_request: - types: [closed] - paths: - - '.github/project.yml' - -jobs: - release: - runs-on: ubuntu-latest - name: release - if: ${{github.event.pull_request.merged == true}} - - steps: - - uses: radcortez/project-metadata-action@master - name: Retrieve project metadata - id: metadata - with: - github-token: ${{secrets.GITHUB_TOKEN}} - metadata-file-path: '.github/project.yml' - - - uses: actions/checkout@v4 - - - name: Import GPG key - id: import_gpg - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - - - name: Install JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: 17 - check-latest: true - - - name: Configure Git author - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - - name: Maven release ${{steps.metadata.outputs.current-version}} - run: | - gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg - git checkout -b release - mvn -B release:prepare -Prelease,framework,extensions,examples -DautoVersionSubmodules -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s maven-settings.xml - git checkout ${{github.base_ref}} - git rebase release - mvn -B release:perform -DskipITs -Prelease,framework -s maven-settings.xml - - name: Push changes to ${{github.base_ref}} - uses: ad-m/github-push-action@v0.8.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{github.base_ref}} - - - name: Push tags - uses: ad-m/github-push-action@v0.8.0 - with: - branch: ${{github.base_ref}} - github_token: ${{ secrets.GITHUB_TOKEN }} - tags: true