Skip to content

Commit 3881ebc

Browse files
test6
1 parent 60be1dd commit 3881ebc

File tree

1 file changed

+57
-28
lines changed

1 file changed

+57
-28
lines changed

.github/workflows/maven-publish.yml

Lines changed: 57 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,32 @@ on:
4949
push:
5050
branches: [ main ]
5151
jobs:
52-
# publish:
53-
#
54-
# runs-on: ubuntu-latest
55-
#
56-
# permissions:
57-
# contents: read
58-
# packages: write
59-
#
60-
# steps:
61-
# - uses: actions/checkout@v3
62-
#
63-
# - name: Set up JDK 17
64-
# uses: actions/setup-java@v3
65-
# with:
66-
# java-version: '17'
67-
# distribution: 'temurin'
68-
# server-id: github
69-
# # settings-path: ${{ github.workspace }} # location for the settings.xml file
70-
# # - name: Build with Maven
71-
# # run: mvn -B package --file pom.xml
72-
#
73-
# - name: Publish package
74-
# run: mvn --batch-mode deploy -Dmaven.test.skip
75-
# env:
76-
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
52+
53+
# publish:
54+
#
55+
# runs-on: ubuntu-latest
56+
#
57+
# permissions:
58+
# contents: read
59+
# packages: write
60+
#
61+
# steps:
62+
# - uses: actions/checkout@v3
63+
#
64+
# - name: Set up JDK 17
65+
# uses: actions/setup-java@v3
66+
# with:
67+
# java-version: '17'
68+
# distribution: 'temurin'
69+
# server-id: github
70+
# # settings-path: ${{ github.workspace }} # location for the settings.xml file
71+
# # - name: Build with Maven
72+
# # run: mvn -B package --file pom.xml
73+
#
74+
# - name: Publish package
75+
# run: mvn --batch-mode deploy -Dmaven.test.skip
76+
# env:
77+
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
7778

7879

7980
release-on-push:
@@ -87,7 +88,35 @@ jobs:
8788
bump_version_scheme: minor
8889
tag_prefix: ""
8990

90-
- name: Check Output Parameters
91+
92+
publish:
93+
94+
runs-on: ubuntu-latest
95+
96+
permissions:
97+
contents: read
98+
packages: write
99+
100+
steps:
101+
- uses: actions/checkout@v3
102+
103+
- name: Set up JDK 11
104+
uses: actions/setup-java@v3
105+
with:
106+
java-version: '11'
107+
distribution: 'temurin'
108+
server-id: github
109+
110+
- name: Prepare and tag
91111
run: |
92-
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
93-
echo "Got release version ${{ steps.release.outputs.version }}"
112+
git config user.name serhii-petrenko
113+
git config user.email spetrenko@gmail.com
114+
115+
mvn -V -B release:prepare -DtagNameFormat=@{project.version} -Darguments=-DskipTests -DpushChanges=false
116+
mvn -V -B release:clean
117+
git push
118+
git push --tags
119+
env:
120+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
121+
MAVEN_USERNAME: serhii-petrenko
122+
MAVEN_PASSWORD: ${{ secrets.TOKEN }}

0 commit comments

Comments
 (0)