File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <settings xmlns =" http://maven.apache.org/SETTINGS/1.0.0"
2+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : schemaLocation =" http://maven.apache.org/SETTINGS/1.0.0
4+ http://maven.apache.org/xsd/settings-1.0.0.xsd" >
5+
6+ <activeProfiles >
7+ <activeProfile >github</activeProfile >
8+ </activeProfiles >
9+
10+ <profiles >
11+ <profile >
12+ <id >github</id >
13+ <repositories >
14+ <repository >
15+ <id >central</id >
16+ <url >https://repo1.maven.org/maven2</url >
17+ </repository >
18+ <repository >
19+ <id >github</id >
20+ <url >https://maven.pkg.github.com/aboutbits/*</url >
21+ </repository >
22+ </repositories >
23+ </profile >
24+ </profiles >
25+
26+ <servers >
27+ <server >
28+ <id >github</id >
29+ <username >${env.GITHUB_USER_NAME}</username >
30+ <password >${env.GITHUB_ACCESS_TOKEN}</password >
31+ </server >
32+ </servers >
33+ </settings >
Original file line number Diff line number Diff line change 1+ name : Publish package to GitHub Packages
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ version :
6+ description : " Version name to publish (eg: x.x.x)"
7+ type : string
8+ required : true
9+
10+ jobs :
11+ publish :
12+ timeout-minutes : 15
13+ runs-on : ubuntu-22.04
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - uses : aboutbits/github-actions-java/setup@v3
22+
23+ - name : Set Version
24+ run : sed -i 's|<version>BUILD-SNAPSHOT</version>|<version>${{ github.event.inputs.version }}</version>|g' pom.xml
25+
26+ - name : Publish package
27+ run : mvn -s $GITHUB_WORKSPACE/.github/workflows/maven-settings.xml --batch-mode deploy
28+ env :
29+ GITHUB_USER_NAME : ${{ github.actor }}
30+ GITHUB_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+
32+ tag :
33+ timeout-minutes : 5
34+ runs-on : ubuntu-22.04
35+ needs : publish
36+ steps :
37+ - uses : actions/checkout@v4
38+
39+ - name : Tag Deployment
40+ uses : aboutbits/github-actions-base/git-create-or-update-tag@v1
41+ with :
42+ tag-name : ${{ github.event.inputs.version }}
43+ user-name : ' AboutBits'
44+ user-email : ' info@aboutbits.it'
Original file line number Diff line number Diff line change 1- .idea
1+ .idea
2+ target
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
4+ <modelVersion >4.0.0</modelVersion >
5+
6+ <groupId >it.aboutbits</groupId >
7+ <artifactId >java-checkstyle-config</artifactId >
8+ <version >BUILD-SNAPSHOT</version >
9+ <description >Checkstyle config for all JAVA projects.</description >
10+ <packaging >jar</packaging >
11+
12+ <distributionManagement >
13+ <repository >
14+ <id >github</id >
15+ <name >GitHub Packages</name >
16+ <url >https://maven.pkg.github.com/aboutbits/java-checkstyle-config</url >
17+ </repository >
18+ </distributionManagement >
19+ </project >
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments