From 72af7ce8f5ced6b590a303c15ba2bbc0f6a032a1 Mon Sep 17 00:00:00 2001 From: EtienneDx <32039535+EtienneDx@users.noreply.github.com> Date: Thu, 9 Sep 2021 11:02:08 +0200 Subject: [PATCH 1/2] feat: deploy to github packages --- .github/workflows/maven-publish.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..41f60e4 --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,34 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 16 + uses: actions/setup-java@v2 + with: + java-version: '16' + distribution: 'adopt' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + 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 + env: + GITHUB_TOKEN: ${{ github.token }} From 17f80c33d73a1c7dfa31750d82cf3719a3d5e5bf Mon Sep 17 00:00:00 2001 From: Etienne Dx Date: Thu, 9 Sep 2021 11:16:45 +0200 Subject: [PATCH 2/2] feat: github action deployement --- .github/workflows/maven-publish.yml | 42 ++++++++++------------------- .vscode/settings.json | 1 + pom.xml | 9 ++++++- 3 files changed, 23 insertions(+), 29 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 41f60e4..0cba306 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,34 +1,20 @@ -# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created -# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path - -name: Maven Package - +name: Publish package to GitHub Packages on: release: types: [created] - jobs: - build: - - runs-on: ubuntu-latest - permissions: + publish: + runs-on: ubuntu-latest + permissions: contents: read - packages: write - + packages: write steps: - - uses: actions/checkout@v2 - - name: Set up JDK 16 - uses: actions/setup-java@v2 - with: - java-version: '16' - distribution: 'adopt' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - 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 - env: - GITHUB_TOKEN: ${{ github.token }} + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + java-version: '16' + distribution: 'adopt' + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pom.xml b/pom.xml index b0a8080..ee63886 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 Me.EtienneDx RealEstate - 1.2.2 + 1.3.0 RealEstate A spigot plugin for selling, renting and leasing GriefPrevention claims @@ -57,6 +57,13 @@ + + + github + GitHub Packages + https://maven.pkg.github.com/EtienneDx/RealEstate + + spigot-repo