From 6924f73ee016582f21bae0cec5f0e818642eb1d5 Mon Sep 17 00:00:00 2001 From: Bryan Clark Date: Thu, 19 Dec 2019 08:52:26 -0800 Subject: [PATCH] Address latest review feedback --- README.md | 18 ++++++++++++------ action.yml | 4 ++-- dist/index.js | Bin 158399 -> 158314 bytes package.json | 5 +++-- src/auth.ts | 22 +++++++++------------- src/setup-java.ts | 6 ++++-- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index e725c55..f6d6a44 100644 --- a/README.md +++ b/README.md @@ -72,22 +72,26 @@ jobs: server-id: github # Value of the distributionManagement/repository/id field of the pom.xml username: ${{ github.actor }} # username for server authentication password: ${{ github.token }} # password or token for authentication + - name: Build with Maven run: mvn -B package --file pom.xml + - name: Publish to GitHub Packages Apache Maven run: mvn deploy + - name: Set up Apache Maven Central uses: actions/setup-java@v1 with: # running setup-java again overwrites the settings.xml java-version: 1.8 server-id: maven - username: maven_username - password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} # password from secrets store + server-username: maven_username + server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} # password from secrets store + - name: Publish to Apache Maven Central run: mvn deploy ``` -***NOTE: The `settings.xml` file is created in the Actions $HOME directory. If you have an existing `settings.xml` file at that location, it will be overwritten*** +***NOTE: The `settings.xml` file is created in the Actions $HOME directory. If you have an existing `settings.xml` file at that location, it will be overwritten. See below for using the `settings-path` to change your `settings.xml` file location.*** See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file. @@ -114,7 +118,7 @@ jobs: PASSWORD: ${{ secrets.GITHUB_TOKEN }} ``` -***NOTE: The `USERNAME` and `PASSWORD` need to correspond to the credentials environment variables used in the publishing section of your `build.gradle`..*** +***NOTE: The `USERNAME` and `PASSWORD` need to correspond to the credentials environment variables used in the publishing section of your `build.gradle`.*** See the help docs on [Publishing a Package with Gradle](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-gradle-for-use-with-github-packages#example-using-gradle-groovy-for-a-single-package-in-a-repository) for more information on the `build.gradle` configuration file. @@ -135,11 +139,13 @@ jobs: with: java-version: 1.8 server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - username: ${{ github.actor }} # username for server authentication - password: ${{ github.token }} # password or token for authentication + server-username: ${{ github.actor }} # username for server authentication + server-password: ${{ github.token }} # password or token for authentication settings-path: ${{ github.workspace }} # location for the settings.xml file + - name: Build with Maven run: mvn -B package --file pom.xml + - name: Publish to GitHub Packages Apache Maven run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml ``` diff --git a/action.yml b/action.yml index c6c5284..df1a2c1 100644 --- a/action.yml +++ b/action.yml @@ -23,10 +23,10 @@ inputs: description: 'ID of the distributionManagement repository in the pom.xml file.' required: false - username: + server-username: description: 'Username for authentication to the Apache Maven repository.' required: false - password: + server-password: description: 'Password or token for authentication to the Apache Maven repository.' required: false diff --git a/dist/index.js b/dist/index.js index cad273103c188f739219c0e45d8585ad934be6bc..e9e7cc342516b5c869d6fdc54ed32521dd8d39af 100644 GIT binary patch delta 336 zcmdmgmGjjV&J7D$m@Nzqo0qU`U&6w;$B)U_aPmUq!0jv8nc}#o=Lj=7Ojp^+D8!kQ zpPX2dnV+XQT_J)=WO{`Nll63+XN*;x-Omf@fgBcAOw`<2Sy4Hg%g;}(ddHS3P#w2D-Bjf3ek&H&n#>R%z z_i!^=ZqJWo^ktr&7sJRteNPOdFNDPz%eZcOLmU&YU}lO!O^rfnacWUsVs0vsJ>5H& zQFgL`1B+9BPO4scVo{!kx?@g`g0TWnO<8J@u102x4qStdLSkNuLP272ae01Gil#zh zQK~{wYGG++QEG~w`t*mUOp=q|zvh}O<;XStbSz{1_Fxt!Cg$zEqD(N^&J7D$m`#j~o0qU`U&6w;$8Y=W1V#f!CL`m?3ylM}*V`~{W}Ytolre+f z+{98-)0!(eKd-n%A+dCNp(B$TvxSlQ_U%s@+n6~@i&Km85_40hFL=qQI(`0gMz-nY zFBzq#&v?nWZu)~)jK$keB{I6zGnt!AUSJ#qGPqxDd+=*UCT1ohbA(;n)4~~7vrqqL zz{KO7nwOlPl9`uorJ!C~lBR2+uA`8alL+FLSEwu0S}W-5gPB$eKAG96K&HAvQfY}o zT4H8Su|j5=LP26lhC*sZW^qaJbf$Pl|LHg48Fi*RKVuY{oTtM!T_k}~jXl4hBopYP z=^Nr1MLCiaOOi7bG*YKK@G*%9rRo8#PgStBRZw?zjqnT(QJ-$8#3V9Vz=36YLp-DP z^fOFM9Mcb6V&s@EmcVE