Skip to content

Commit

Permalink
Merge pull request #10 from reportportal/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
HardNorth authored Jan 6, 2023
2 parents 0594382 + 3eeef3b commit 5d03c31
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 42 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2021 EPAM Systems
# Copyright 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -16,31 +16,33 @@ name: CI Build
on:
push:
branches:
- '*'
- '!main'
- '*'
- '!main'
paths-ignore:
- README.md
- README_TEMPLATE.md
- CHANGELOG.md
- README.md
- README_TEMPLATE.md
- CHANGELOG.md

pull_request:
branches:
- main
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'

- name: Build with Gradle
run: ./gradlew build
- name: Build with Gradle
run: ./gradlew build

- name: Codecov upload
run: bash <(curl -s https://codecov.io/bash)
- name: Codecov upload
run: bash <(curl -s https://codecov.io/bash)
41 changes: 19 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2021 EPAM Systems
# Copyright 2022 EPAM Systems
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -18,17 +18,17 @@ on:
branches:
- main
paths-ignore:
- '.github/**'
- README.md
- README_TEMPLATE.md
- gradle.properties
- CHANGELOG.md

env:
VERSION_FILE: gradle.properties
VERSION_EXTRACT_PATTERN: '(?<=version=).+'
REPOSITORY_URL: 'https://maven.pkg.github.com/'
CHANGE_LOG_FILE: CHANGELOG.md
CHANGE_LOG_TMP_FILE: CHANGELOG_updated.md
REPOSITORY_URL: 'https://maven.pkg.github.com/'
README_FILE: README.md
README_TEMPLATE_FILE: README_TEMPLATE.md
README_VERSION_PLACEHOLDER: $LATEST_VERSION
Expand All @@ -38,22 +38,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Generate versions
uses: HardNorth/github-version-generate@v1.2.0
uses: HardNorth/github-version-generate@v1
with:
version-source: file
version-file: ${{ env.VERSION_FILE }}
version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }}

- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 1.8
distribution: 'temurin'
java-version: '8'

- name: Setup git credentials
uses: oleksiyrudenko/gha-git-credentials@v2
uses: oleksiyrudenko/gha-git-credentials@v2.1.1
with:
name: 'reportportal.io'
email: 'support@reportportal.io'
Expand All @@ -70,8 +71,8 @@ jobs:
- name: Update README.md
id: readmeUpdate
run: |
sed 's/${{env.README_VERSION_PLACEHOLDER}}/${{env.RELEASE_VERSION}}/g' ${{env.README_TEMPLATE_FILE}} > ${{env.README_FILE}}
git add ${{env.README_FILE}}
sed 's/${{ env.README_VERSION_PLACEHOLDER }}/${{ env.RELEASE_VERSION }}/g' ${{ env.README_TEMPLATE_FILE }} > ${{ env.README_FILE }}
git add ${{ env.README_FILE }}
git commit -m "Readme update"
- name: Update CHANGELOG.md
Expand All @@ -90,25 +91,21 @@ jobs:
- name: Read changelog Entry
id: readChangelogEntry
uses: mindsers/changelog-reader-action@v1.3.1
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ env.RELEASE_VERSION }}
path: ./${{ env.CHANGE_LOG_FILE }}

- name: Create Release
id: createRelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: ncipollo/release-action@v1
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: Release ${{ env.RELEASE_VERSION }}
body: ${{ steps.readChangelogEntry.outputs.log_entry }}
draft: false
prerelease: false
tag: ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }}
body: ${{ steps.readChangelogEntry.outputs.changes }}

- name: Checkout develop branch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: 'develop'
fetch-depth: 0
Expand All @@ -119,4 +116,4 @@ jobs:
git merge -m 'Merge main branch into develop after a release' origin/main
git status | (! grep -Fq 'both modified:') || git status | grep -F 'both modified:' \
| { echo -e 'Unable to merge main into develop, merge conflicts:'; (! grep -Eo '[^ ]+$') }
git push
git push origin develop
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Changed
- Client version updated on [5.1.15](https://github.com/reportportal/client-java/releases/tag/5.1.15), by @HardNorth

## [5.1.3]
### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Maven Central](https://img.shields.io/maven-central/v/com.epam.reportportal/utils-java-formatting.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.epam.reportportal%22%20AND%20a:%22utils-java-formatting%22)
[![CI Build](https://github.com/reportportal/utils-java-formatting/actions/workflows/ci.yml/badge.svg)](https://github.com/reportportal/utils-java-formatting/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/reportportal/utils-java-formatting/branch/develop/graph/badge.svg?token=D21P4TVVAS)](https://codecov.io/gh/reportportal/utils-java-formatting)
[![Join Slack chat!](https://reportportal-slack-auto.herokuapp.com/badge.svg)](https://reportportal-slack-auto.herokuapp.com)
[![Join Slack chat!](https://slack.epmrpp.reportportal.io/badge.svg)](https://slack.epmrpp.reportportal.io/)
[![stackoverflow](https://img.shields.io/badge/reportportal-stackoverflow-orange.svg?style=flat)](http://stackoverflow.com/questions/tagged/reportportal)
[![Build with Love](https://img.shields.io/badge/build%20with-❤%EF%B8%8F%E2%80%8D-lightgrey.svg)](http://reportportal.io?style=flat)

Expand Down
2 changes: 1 addition & 1 deletion README_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Maven Central](https://img.shields.io/maven-central/v/com.epam.reportportal/utils-java-formatting.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.epam.reportportal%22%20AND%20a:%22utils-java-formatting%22)
[![CI Build](https://github.com/reportportal/utils-java-formatting/actions/workflows/ci.yml/badge.svg)](https://github.com/reportportal/utils-java-formatting/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/reportportal/utils-java-formatting/branch/develop/graph/badge.svg?token=D21P4TVVAS)](https://codecov.io/gh/reportportal/utils-java-formatting)
[![Join Slack chat!](https://reportportal-slack-auto.herokuapp.com/badge.svg)](https://reportportal-slack-auto.herokuapp.com)
[![Join Slack chat!](https://slack.epmrpp.reportportal.io/badge.svg)](https://slack.epmrpp.reportportal.io/)
[![stackoverflow](https://img.shields.io/badge/reportportal-stackoverflow-orange.svg?style=flat)](http://stackoverflow.com/questions/tagged/reportportal)
[![Build with Love](https://img.shields.io/badge/build%20with-❤%EF%B8%8F%E2%80%8D-lightgrey.svg)](http://reportportal.io?style=flat)

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repositories {
}

dependencies {
api 'com.epam.reportportal:client-java:5.1.11'
api 'com.epam.reportportal:client-java:5.1.15'
api 'com.google.code.findbugs:jsr305:3.0.2'
api 'com.epam.reportportal:commons-model:5.0.0'

Expand Down

0 comments on commit 5d03c31

Please sign in to comment.