Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the new logic for tokens #113

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/shared-publish-to-maven-versioned.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,31 @@ jobs:
new_version=${{ steps.version.outputs.new_version }}
sed -i "s/$current_version/$new_version/g" ${{ inputs.working_dir }}/pom.xml
echo "Version number updated from $current_version to $new_version"
- name: Create Maven Settings
run: |
cd ./${{ inputs.working_dir }}
echo "<settings>
<servers>
<server>
<id>ossrh</id>
<username>${{ secrets.SONATYPE_REPO_USERNAME }}</username>
<password>${{ secrets.SONATYPE_REPO_TOKEN }}</password>
</server>
</servers>
</settings>
" >> settings.xml

- name: Publish
if: ${{ inputs.publish_to_maven }}
run: |
cd ./${{ inputs.working_dir }}
mvn -B -Drepo.id=ossrh -Drepo.login=${{ secrets.SONATYPE_REPO_ACCOUNT }} -Drepo.pwd="${{ secrets.SONATYPE_REPO_PASSWORD }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean deploy
mvn -B -s settings.xml -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean deploy

- name: Compile
if: ${{ inputs.publish_to_maven != true }}
run: |
cd ./${{ inputs.working_dir }}
mvn -B -Drepo.id=ossrh -Drepo.login=${{ secrets.SONATYPE_REPO_ACCOUNT }} -Drepo.pwd="${{ secrets.SONATYPE_REPO_PASSWORD }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean compile test
mvn -B -s settings.xml -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean compile test

- name: Commit pom.xml and version.json
if: ${{ steps.checkRelease.outputs.is_release != 'true' }}
Expand Down