Skip to content

Commit

Permalink
fix(workflow): 🐛 fixed pom file issue in release workflow (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
WasiqB authored Oct 29, 2023
1 parent 977a5a3 commit 7e5cd78
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 724 deletions.
7 changes: 5 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ updates:
reviewers:
- 'boyka-core'
schedule:
interval: 'monthly'
interval: 'weekly'
timezone: 'Asia/Calcutta'

- package-ecosystem: 'maven'
Expand All @@ -37,7 +37,7 @@ updates:
reviewers:
- 'boyka-core'
schedule:
interval: 'monthly'
interval: 'weekly'
timezone: 'Asia/Calcutta'

- package-ecosystem: 'github-actions'
Expand All @@ -49,3 +49,6 @@ updates:
- 'github_actions'
reviewers:
- 'boyka-core'
schedule:
interval: 'weekly'
timezone: 'Asia/Calcutta'
39 changes: 24 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ jobs:
run: mvn build-helper:parse-version versions:set -f core-java/pom.xml -DnewVersion=${{ needs.prepare.outputs.new-version }}-SNAPSHOT versions:commit

- name: Release snapshot to Maven central
uses: samuelmeuli/action-maven-publish@v1
uses: WasiqB/maven-publish-action@v1.1.0
with:
gpg_private_key: ${{ env.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ env.GPG_PASSPHRASE }}
nexus_username: ${{ env.NEXUS_USERNAME }}
nexus_password: ${{ env.NEXUS_PASSWORD }}
maven_profiles: release
server_id: ossrh
maven_args: --settings ${{ github.workspace }}/core-java/setting/settings.xml -f core-java/pom.xml -DskipTests -Dcheckstyle.skip -B
settings_path: ${{ github.workspace }}/core-java/setting/settings.xml
directory: ${{ github.workspace }}/core-java
maven_args: -DskipTests -Dcheckstyle.skip

release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -146,16 +148,18 @@ jobs:
- name: Maven command to update release version
run: mvn build-helper:parse-version versions:set -f core-java/pom.xml -DnewVersion=${{ needs.prepare.outputs.new-version }} versions:commit

- name: Release to Maven central
uses: samuelmeuli/action-maven-publish@v1
- name: Release snapshot to Maven central
uses: WasiqB/maven-publish-action@v1.1.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
gpg_private_key: ${{ env.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ env.GPG_PASSPHRASE }}
nexus_username: ${{ env.NEXUS_USERNAME }}
nexus_password: ${{ env.NEXUS_PASSWORD }}
maven_profiles: release
server_id: ossrh
maven_args: --settings ${{ github.workspace }}/core-java/setting/settings.xml -f core-java/pom.xml -DskipTests -Dcheckstyle.skip -B
settings_path: ${{ github.workspace }}/core-java/setting/settings.xml
directory: ${{ github.workspace }}/core-java
maven_args: -DskipTests -Dcheckstyle.skip

- name: Build the project JAR files
run: mvn clean install -f core-java/pom.xml -DskipTests -Dcheckstyle.skip
Expand All @@ -171,10 +175,9 @@ jobs:
- name: Upload version files folder
uses: actions/upload-artifact@v3
with:
name: version-files-${{ github.run_id }}
name: version-pom-files-${{ github.run_id }}
retention-days: 1
path: |
${{ github.workspace }}/core-java/pom.xml
path: ${{ github.workspace }}/core-java/pom.xml

push-pom:
runs-on: ubuntu-latest
Expand All @@ -193,6 +196,12 @@ jobs:
with:
name: version-files-${{ github.run_id }}

- name: Download Version files
uses: actions/download-artifact@v3
with:
name: version-pom-files-${{ github.run_id }}
path: ${{ github.workspace }}/core-java/pom.xml

- name: Update new version in README and Usage
uses: jacobtomlinson/gha-find-replace@v3
if: ${{ ! inputs.pre-release }}
Expand All @@ -201,8 +210,8 @@ jobs:
replace: ${{ needs.prepare.outputs.new-version }}
regex: false
include: |
README.md
website/docs/framework-docs/getting-started/usage.md
${{ github.workspace }}/README.md
${{ github.workspace }}/website/docs/framework-docs/getting-started/usage.md
- name: Update new version in package.json
uses: jacobtomlinson/gha-find-replace@v3
Expand All @@ -212,7 +221,7 @@ jobs:
replace: '"version": "${{ needs.prepare.outputs.new-version }}"'
regex: false
include: |
package.json
${{ github.workspace }}/package.json
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
Expand Down
6 changes: 3 additions & 3 deletions core-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
-->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.wasiqb.boyka</groupId>
<artifactId>boyka-framework</artifactId>
<version>0.18.0</version>
<version>0.19.0-beta.0</version>
<inceptionYear>2022</inceptionYear>
<name>${project.groupId}:${project.artifactId}</name>
<description>🎉 Ultimate test automation framework for testing any application on any platform</description>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"devDependencies": {
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
"@lerna/child-process": "^7.4.1",
"@lerna/child-process": "^7.4.2",
"@lerna/version": "^6.6.2",
"@types/node": "^20.8.9",
"@typescript-eslint/eslint-plugin": "^6.9.0",
Expand Down
13 changes: 11 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7e5cd78

Please sign in to comment.