-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update release and publish process
Signed-off-by: Ruben Romero Montes <[email protected]>
- Loading branch information
Showing
6 changed files
with
92 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: CI | ||
on: | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy-packages: | ||
if: github.repository_owner == 'RHEcosystemAppEng' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
name: Deploy | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Java 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Set NPM auth token | ||
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc | ||
- name: Build and Publish to GitHub Maven Packages | ||
run: mvn -B deploy -Prelease --file pom.xml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ The packages are published to the GitHub maven repository. Make sure to add it t | |
<dependency> | ||
<groupId>com.redhat.ecosystemappeng</groupId> | ||
<artifactId>exhort-api</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<version>1.0.1-SNAPSHOT</version> | ||
</dependency> | ||
``` | ||
|
||
|
@@ -36,5 +36,5 @@ echo "@RHEcosystemAppEng:registry=https://npm.pkg.github.com" >> .npmrc | |
Then, add it to your project as follows: | ||
|
||
```bash | ||
npm install @RHEcosystemAppEng/[email protected].0-SNAPSHOT | ||
npm install @RHEcosystemAppEng/[email protected].1-SNAPSHOT | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.redhat.ecosystemappeng</groupId> | ||
|
@@ -17,6 +15,8 @@ | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.release>14</maven.compiler.release> | ||
<js-api>${project.build.directory}/js-api</js-api> | ||
<maven.build.timestamp.format>yyyyMMdd.HHmmss</maven.build.timestamp.format> | ||
<timestamp>${maven.build.timestamp}</timestamp> | ||
<!-- Dependencies --> | ||
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> | ||
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> | ||
|
@@ -68,7 +68,7 @@ | |
<url>https://github.com/RHEcosystemAppEng/exhort-api-spec</url> | ||
<connection>scm:git:[email protected]:RHEcosystemAppEng/exhort-api-spec.git</connection> | ||
<developerConnection>scm:git:[email protected]:RHEcosystemAppEng/exhort-api-spec.git</developerConnection> | ||
<tag>HEAD</tag> | ||
<tag>v1.0.0</tag> | ||
</scm> | ||
|
||
<ciManagement> | ||
|
@@ -185,8 +185,11 @@ | |
<version>${maven-release-plugin.version}</version> | ||
<configuration> | ||
<arguments>-Pprepare-deployment,deploy-github</arguments> | ||
<scmCommentPrefix>build(release): [skip ci] </scmCommentPrefix> | ||
<scmCommentPrefix>build(release): </scmCommentPrefix> | ||
<signTag>true</signTag> | ||
<goals>install</goals> | ||
<tagNameFormat>v@{project.version}</tagNameFormat> | ||
<preparationGoals>clean compile</preparationGoals> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
|
@@ -564,7 +567,7 @@ limitations under the License.]]> | |
<goal>yarn</goal> | ||
</goals> | ||
<configuration> | ||
<arguments>publish</arguments> | ||
<arguments>run publish:snapshot</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
|
@@ -579,44 +582,60 @@ limitations under the License.]]> | |
</build> | ||
|
||
<profiles> | ||
<!-- use this profile for development stage --> | ||
<profile> | ||
<id>dev</id> | ||
<properties> | ||
<enforcer.skip>true</enforcer.skip> | ||
<license.skip>true</license.skip> | ||
</properties> | ||
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<groupId>com.github.eirslett</groupId> | ||
<artifactId>frontend-maven-plugin</artifactId> | ||
<version>${frontend-maven-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>install node and yarn</id> | ||
<phase>initialize</phase> | ||
<goals> | ||
<goal>install-node-and-yarn</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>yarn install</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>yarn</goal> | ||
</goals> | ||
<configuration> | ||
<arguments>install</arguments> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>yarn compile</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>yarn</goal> | ||
</goals> | ||
<configuration> | ||
<arguments>run compile</arguments> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>yarn publish</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>yarn</goal> | ||
</goals> | ||
<configuration> | ||
<arguments>publish</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<failOnWarning>false</failOnWarning> | ||
<nodeVersion>${node.version}</nodeVersion> | ||
<yarnVersion>${yarn.version}</yarnVersion> | ||
<workingDirectory>${js-api}</workingDirectory> | ||
<installDirectory>target</installDirectory> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<!-- use this profile to include github registry distribution definition --> | ||
<!-- requires credentials set for github in ~/.m2/settings.xml --> | ||
<profile> | ||
<id>deploy-github</id> | ||
<distributionManagement> | ||
<repository> | ||
<id>github</id> | ||
<url>https://maven.pkg.github.com/RHEcosystemAppEng/exhort-api-spec</url> | ||
</repository> | ||
<snapshotRepository> | ||
<id>github</id> | ||
<url>https://maven.pkg.github.com/RHEcosystemAppEng/exhort-api-spec</url> | ||
</snapshotRepository> | ||
</distributionManagement> | ||
</profile> | ||
<!-- use this profile for packaging of jars to deploy to artifact repository --> | ||
<profile> | ||
<id>prepare-deployment</id> | ||
<build> | ||
<plugins> | ||
<!-- flatten-maven-plugin:flatten is bound to the process-resources phase and will create | ||
a .flattened-pom.xml --> | ||
<plugin> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters