Skip to content

Commit

Permalink
Moved settings.xml into CI workflow
Browse files Browse the repository at this point in the history
To make it easier to extract a shared workflow.
  • Loading branch information
freemanjp committed Aug 2, 2022
1 parent 26febe5 commit 8f692dd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
19 changes: 0 additions & 19 deletions .github/maven/settings.xml

This file was deleted.

25 changes: 24 additions & 1 deletion .github/workflows/maven-deploy.yml
Expand Up @@ -27,10 +27,33 @@ jobs:
with:
key-suffix: '-deploy'
additional-path: '!~/.m2/repository/com/github/gantsign/maven'
- name: Configure maven settings.xml
shell: bash
run: |
mkdir -p ~/.m2
cat << 'EOF' > ~/.m2/settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_USER}</username>
<password>${env.OSSRH_TOKEN}</password>
</server>
<server>
<id>github</id>
<username>${env.GITHUB_ACTOR}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>
EOF
- name: Deploy with Maven
run: |
./mvnw deploy \
--settings .github/maven/settings.xml \
-P publish-artifacts,sign-artifacts,ossrh-deploy \
-DskipTests \
-Dinvoker.skip=true \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -63,7 +63,6 @@ jobs:
- name: Deploy Maven site
run: |
./mvnw scm-publish:publish-scm \
--settings .github/maven/settings.xml \
-P gh-pages \
-DskipTests \
-Dinvoker.skip=true \
Expand Down

0 comments on commit 8f692dd

Please sign in to comment.