Skip to content

Commit 840e3f7

Browse files
Addd Jleaeser (#58)
1 parent 209e6bd commit 840e3f7

File tree

6 files changed

+146
-60
lines changed

6 files changed

+146
-60
lines changed
File renamed without changes.

.github/workflows/greetings.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/release-actions.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Release version"
8+
required: true
9+
next:
10+
description: "Next version"
11+
required: false
12+
13+
jobs:
14+
version:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
- uses: actions/setup-java@v2
22+
with:
23+
java-version: 11
24+
distribution: temurin
25+
- name: Set release version
26+
id: version
27+
run: |
28+
RELEASE_VERSION=${{ github.event.inputs.version }}
29+
NEXT_VERSION=${{ github.event.inputs.next }}
30+
PLAIN_VERSION=`echo ${RELEASE_VERSION} | awk 'match($0, /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)/) { print substr($0, RSTART, RLENGTH); }'`
31+
COMPUTED_NEXT_VERSION="${PLAIN_VERSION}-SNAPSHOT"
32+
if [ -z $NEXT_VERSION ]
33+
then
34+
NEXT_VERSION=$COMPUTED_NEXT_VERSION
35+
fi
36+
./mvnw -B versions:set versions:commit -DnewVersion=$RELEASE_VERSION
37+
git config --global user.email "project.openubl.preview.bot@gmail.com"
38+
git config --global user.name "Project-Openubl Bot"
39+
git commit -a -m "🏁 Releasing version $RELEASE_VERSION"
40+
git push origin HEAD:master
41+
git rev-parse HEAD > HEAD
42+
echo $RELEASE_VERSION > RELEASE_VERSION
43+
echo $PLAIN_VERSION > PLAIN_VERSION
44+
echo $NEXT_VERSION > NEXT_VERSION
45+
- name: Upload version files
46+
uses: actions/upload-artifact@v2
47+
with:
48+
name: artifacts
49+
path: |
50+
HEAD
51+
*_VERSION
52+
53+
release:
54+
needs: [ version ]
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/download-artifact@v2
58+
with:
59+
name: artifacts
60+
path: artifacts
61+
- name: Read HEAD ref
62+
id: head
63+
uses: juliangruber/read-file-action@v1
64+
with:
65+
path: artifacts/HEAD
66+
- uses: actions/checkout@v2
67+
with:
68+
ref: ${{ steps.head.outputs.content }}
69+
70+
- name: Release with JReleaser
71+
uses: jreleaser/release-action@v2
72+
env:
73+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.RELEASE_VERSION }}
75+
JRELEASER_ZULIP_API_KEY: ${{ secrets.JRELEASER_ZULIP_API_KEY }}
76+
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.JRELEASER_TWITTER_CONSUMER_KEY }}
77+
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.JRELEASER_TWITTER_CONSUMER_SECRET }}
78+
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.JRELEASER_TWITTER_ACCESS_TOKEN }}
79+
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.JRELEASER_TWITTER_ACCESS_TOKEN_SECRET }}
80+
- name: Release Maven package
81+
uses: samuelmeuli/action-maven-publish@v1
82+
with:
83+
gpg_private_key: ${{ secrets.gpg_private_key }}
84+
gpg_passphrase: ${{ secrets.gpg_passphrase }}
85+
nexus_username: ${{ secrets.nexus_username }}
86+
nexus_password: ${{ secrets.nexus_password }}
87+
- name: Set next version
88+
env:
89+
NEXT_VERSION: ${{ steps.version.outputs.NEXT_VERSION }}
90+
run: |
91+
./mvnw -B versions:set versions:commit -DnewVersion=$NEXT_VERSION
92+
git config --global user.email "project.openubl.preview.bot@gmail.com"
93+
git config --global user.name "Project-Openubl Bot"
94+
git commit -a -m "⬆️ Next version $NEXT_VERSION"
95+
git push origin HEAD:master

jreleaser.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#
2+
# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates
3+
# and other contributors as indicated by the @author tags.
4+
#
5+
# Licensed under the Apache License - 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
project:
19+
name: xbuilder
20+
description: Crea XMLs basados en UBL 2.1 y las especificaciones de SUNAT, Perú.
21+
longDescription: Consulta el DNI o RUC de cualquier persona natural o jurídica registrada en el territorio peruano. La información es obtenida del padrón reducido de la SUNAT.
22+
website: https://project-openubl.github.io/
23+
authors:
24+
- Carlos E. Feria Vila
25+
license: Apache-2
26+
java:
27+
groupId: io.github.project-openubl
28+
version: 11
29+
extraProperties:
30+
inceptionYear: 2019
31+
32+
release:
33+
github:
34+
owner: project-openubl
35+
name: xbuilder
36+
branch: master
37+
overwrite: true
38+
discussionCategoryName: Announcements
39+
40+
announce:
41+
zulip:
42+
active: RELEASE
43+
account: carlosthe19916@gmail.com
44+
apiHost: https://projectopenubl.zulipchat.com/api/v1
45+
channel: announcements
46+
subject: '{{projectNameCapitalized}} {{projectVersion}} released!'
47+
message: '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
48+
twitter:
49+
active: RELEASE
50+
status: '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
51+

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,6 @@
104104
<version>5.6.2</version>
105105
<scope>test</scope>
106106
</dependency>
107-
<dependency>
108-
<groupId>org.mockito</groupId>
109-
<artifactId>mockito-core</artifactId>
110-
<version>3.3.3</version>
111-
<scope>test</scope>
112-
</dependency>
113107
<dependency>
114108
<groupId>org.xmlunit</groupId>
115109
<artifactId>xmlunit-core</artifactId>

0 commit comments

Comments
 (0)