feat: github action deployement
This commit is contained in:
parent
72af7ce8f5
commit
17f80c33d7
36
.github/workflows/maven-publish.yml
vendored
36
.github/workflows/maven-publish.yml
vendored
@ -1,34 +1,20 @@
|
|||||||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
|
name: Publish package to GitHub Packages
|
||||||
# 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:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
publish:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 16
|
- uses: actions/setup-java@v2
|
||||||
uses: actions/setup-java@v2
|
with:
|
||||||
with:
|
java-version: '16'
|
||||||
java-version: '16'
|
distribution: 'adopt'
|
||||||
distribution: 'adopt'
|
- name: Publish package
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
run: mvn --batch-mode deploy
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- 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 }}
|
|
||||||
1
.vscode/settings.json
vendored
Normal file
1
.vscode/settings.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
9
pom.xml
9
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>Me.EtienneDx</groupId>
|
<groupId>Me.EtienneDx</groupId>
|
||||||
<artifactId>RealEstate</artifactId>
|
<artifactId>RealEstate</artifactId>
|
||||||
<version>1.2.2</version>
|
<version>1.3.0</version>
|
||||||
<name>RealEstate</name>
|
<name>RealEstate</name>
|
||||||
<description>A spigot plugin for selling, renting and leasing GriefPrevention claims</description>
|
<description>A spigot plugin for selling, renting and leasing GriefPrevention claims</description>
|
||||||
<build>
|
<build>
|
||||||
@ -57,6 +57,13 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>github</id>
|
||||||
|
<name>GitHub Packages</name>
|
||||||
|
<url>https://maven.pkg.github.com/EtienneDx/RealEstate</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spigot-repo</id>
|
<id>spigot-repo</id>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user