Skip to content

Commit 51408d5

Browse files
committed
Restore automatic snapshot deployment on push
1 parent 581df28 commit 51408d5

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/maven.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,34 @@ jobs:
148148
with:
149149
name: gwt-${{ matrix.gwt }}-reports
150150
path: target/it-tests/*/build.log
151+
152+
deploy_snapshot:
153+
needs:
154+
- linux
155+
- windows
156+
- test-jdks
157+
- test-gwt
158+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
159+
runs-on: ubuntu-latest
160+
steps:
161+
- uses: actions/checkout@v2
162+
163+
- name: Setup environment
164+
run: echo "JAVA_HOME=${JAVA_HOME_11_X64}" | tee -a $GITHUB_ENV
165+
166+
- name: Cache Maven dependencies
167+
uses: actions/cache@v2
168+
with:
169+
path: |
170+
~/.m2/repository/
171+
!~/.m2/repository/**/*-SNAPSHOT/
172+
target/it-repo/
173+
!target/it-repo/**/*-SNAPSHOT/
174+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
175+
176+
- name: Deploy with Maven
177+
id: maven-build
178+
run: mvn -B -U -ntp -s .github/workflows/settings.xml source:jar deploy -Dmaven.test.skip=true -Dinvoker.skip=true
179+
env:
180+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
181+
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}

.github/workflows/settings.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<settings>
2+
<servers>
3+
<server>
4+
<id>ossrh</id>
5+
<username>${env.OSSRH_USERNAME}</username>
6+
<password>${env.OSSRH_TOKEN}</password>
7+
</server>
8+
</servers>
9+
</settings>

0 commit comments

Comments
 (0)