Skip to content

Commit 5f77bc1

Browse files
author
Micci
committed
👷 build(pom and gitAction): adjust for nightly build&deploy
1 parent 90ef8dc commit 5f77bc1

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

.github/workflows/gitAction.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ on:
88
branches:
99
- main
1010

11+
schedule:
12+
- cron: "20 4 * * *"
13+
1114
jobs:
1215
build:
16+
environment: maven-central
1317
runs-on: ubuntu-latest
1418
steps:
1519
- name: Checkout code
@@ -18,27 +22,41 @@ jobs:
1822
- name: Set up Java
1923
uses: actions/setup-java@v4
2024
with:
21-
distribution: 'adopt'
22-
java-version: '11'
25+
distribution: "adopt"
26+
java-version: "11"
2327

2428
- name: Cache Maven packages
2529
uses: actions/cache@v4
2630
with:
2731
path: ~/.m2/repository
2832
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2933
restore-keys: ${{ runner.os }}-maven-
30-
34+
35+
- name: Configure Maven settings
36+
run: |
37+
mkdir -p ~/.m2
38+
cat <<EOF > ~/.m2/settings.xml
39+
<settings>
40+
<servers>
41+
<server>
42+
<id>central</id>
43+
<username>${{ secrets.USERNAME }}</username>
44+
<password>${{ secrets.PASSWORD }}</password>
45+
</server>
46+
</servers>
47+
</settings>
48+
EOF
49+
3150
- name: Import GPG key
3251
env:
3352
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
3453
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3554
GPG_PUBLIC_KEY: ${{ vars.GPG_PUBLIC_KEY }}
36-
55+
3756
run: |
3857
echo "$GPG_PRIVATE_KEY" | gpg --batch --import
3958
echo "$GPG_PASSPHRASE" | gpg --batch --passphrase-fd 0 --pinentry-mode loopback --sign-key "$GPG_PUBLIC_KEY"
4059
echo "MAVEN_GPG_PASSPHRASE=${{ secrets.GPG_PASSPHRASE }}" >> $GITHUB_ENV
4160
4261
- name: Build and Test
43-
run: mvn -X clean install site
44-
62+
run: mvn -X clean deploy

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ target/
1010
.envrc
1111
.nvimrc.json
1212
!./src/test/resources-its/com/twlabs/mojos/TemplifyIT/test_using_custom_placeholder_settings/target/template
13+
.secrets
14+
.variables

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<groupId>com.thoughtworks.templify</groupId>
66
<artifactId>templify</artifactId>
77
<packaging>maven-plugin</packaging>
8-
<version>0.1.0</version>
8+
<version>0.1.0-SNAPSHOT</version>
99
<name>templify templater maven plugin</name>
1010
<description>A Maven plugin for automating template-based configurations and placeholder replacements across XML, JSON, Java, and more</description>
1111
<url>http://maven.apache.org</url>
1212
<properties>
1313

14-
14+
1515
<!-- General Properties -->
1616
<maven.compiler.target>11</maven.compiler.target>
1717
<maven.compiler.source>11</maven.compiler.source>

0 commit comments

Comments
 (0)