Skip to content

Commit

Permalink
task: Merge XSender and XBuilder into XHandler (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 authored Sep 23, 2023
1 parent 293a142 commit 468827d
Show file tree
Hide file tree
Showing 691 changed files with 179,935 additions and 232 deletions.
51 changes: 31 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,43 @@ jobs:
cache: maven
- name: Maven tests
run: mvn verify
- name: Upload XBuilder e2e Yaml files
uses: actions/upload-artifact@v3
with:
name: xbuilder-e2e-yaml
path: xbuilder/quarkus-extension/integration-tests/src/test/resources/e2e/

quarkus-extension:
needs: [ test ]
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17 ]
module: [ xbuilder, xsender ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
java-version: 17
distribution: temurin
cache: maven
- name: Maven tests
run: mvn -Pnative install
run: mvn install -DskipTests
- name: Download XBuilder e2e Yaml files
uses: actions/download-artifact@v3
with:
name: xbuilder-e2e-yaml
path: xbuilder/quarkus-extension/integration-tests/src/test/resources/e2e/
- name: Maven IT tests
run: mvn -Pnative-image install -f quarkus-extension/integration-tests/
run: mvn -Pnative-image install -f ${{ matrix.module }}/quarkus-extension/integration-tests/

quarkus-supported-v:
needs: [ quarkus-extension ]
needs: [ test ]
runs-on: ubuntu-latest
strategy:
matrix:
quarkus-version: [ 3.0.4.Final, 3.2.6.Final, 3.3.3, 3.4.1 ]
module: [ xbuilder, xsender ]
quarkus-version: [ 3.0.4.Final, 3.2.6.Final, 3.3.3 ]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -67,32 +77,33 @@ jobs:
distribution: temurin
cache: maven
- name: Maven tests
run: mvn -Pnative install
run: mvn install -DskipTests
- name: Download XBuilder e2e Yaml files
uses: actions/download-artifact@v3
with:
name: xbuilder-e2e-yaml
path: xbuilder/quarkus-extension/integration-tests/src/test/resources/e2e/
- name: Maven IT tests
run: mvn -Pnative-image install -f quarkus-extension/integration-tests/ -Dquarkus.version=${{ matrix.quarkus-version }}
run: mvn -Pnative-image install -f ${{ matrix.module }}/quarkus-extension/integration-tests/ -Dquarkus.version=${{ matrix.quarkus-version }}

springboot-extension:
xsender-springboot-extension:
needs: [ test ]
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17 ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
java-version: 17
distribution: temurin
cache: maven
- name: Maven tests
run: mvn install -DskipTests
- name: Maven IT tests
run: mvn install -f spring-boot-extension/integration-tests/
run: mvn install -f xsender/spring-boot-extension/integration-tests/

springboot-supported-v:
needs: [ springboot-extension ]
xsender-springboot-supported-v:
needs: [ xsender-springboot-extension ]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -109,4 +120,4 @@ jobs:
- name: Maven tests
run: mvn install -DskipTests
- name: Maven IT tests
run: mvn install -f spring-boot-extension/integration-tests/ -Dspringboot.version=${{ matrix.springboot-version }}
run: mvn install -f xsender/spring-boot-extension/integration-tests/ -Dspringboot.version=${{ matrix.springboot-version }}
40 changes: 6 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,22 @@ jobs:
git commit --signoff --allow-empty -a -m "🏁 Releasing version $RELEASE_VERSION"
git push origin HEAD:${{ github.event.inputs.branch }}
# OSSRH
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.gpg_private_key }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: OSSRH Release
run: mvn --batch-mode clean compile source:jar javadoc:jar deploy -P ossrh,release -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.nexus_username }}
MAVEN_PASSWORD: ${{ secrets.nexus_password }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}

# # GitHub
# - uses: actions/setup-java@v3
# with:
# distribution: "temurin"
# java-version: 17
# gpg-passphrase: MAVEN_GPG_PASSPHRASE
# - name: GitHub Release
# run: mvn --batch-mode clean compile source:jar javadoc:jar deploy -P github,release -DskipTests
# env:
# GITHUB_TOKEN: ${{ github.token }}
# MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}

- name: JReleaser
uses: jreleaser/release-action@v2
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }}
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }}
JRELEASER_PRERELEASE_PATTERN: .*(?:Alpha|alpha|Beta|beta)[0-9]
JRELEASER_ZULIP_API_KEY: ${{ secrets.JRELEASER_ZULIP_API_KEY }}
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.JRELEASER_TWITTER_CONSUMER_KEY }}
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.JRELEASER_TWITTER_CONSUMER_SECRET }}
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.JRELEASER_TWITTER_ACCESS_TOKEN }}
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.JRELEASER_TWITTER_ACCESS_TOKEN_SECRET }}
JRELEASER_SLACK_TOKEN: ${{ secrets.JRELEASER_SLACK_TOKEN }}
JRELEASER_SLACK_WEBHOOK: ${{ secrets.JRELEASER_SLACK_WEBHOOK }}
JRELEASER_MAIL_PASSWORD: ${{ secrets.JRELEASER_MAIL_PASSWORD }}
JRELEASER_ARTICLE_GITHUB_TOKEN: ${{ secrets.GH_PAT }}
# JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.gpg_private_key }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.gpg_private_key }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}
JRELEASER_NEXUS2_USERNAME: ${{ secrets.nexus_username }}
JRELEASER_NEXUS2_PASSWORD: ${{ secrets.nexus_password }}


- name: Set next version
env:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/snaphots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@ env:
CI: true

jobs:
test:
name: JDK JVM Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
cache: maven
- name: Build with Maven
run: mvn verify

snapshots:
needs: [ test ]
name: Snapshots
if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'project-openubl' }}
runs-on: ubuntu-latest
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,27 @@
| XSender | [![Maven Central](https://img.shields.io/maven-central/v/io.github.project-openubl/xsender)](https://search.maven.org/artifact/io.github.project-openubl/xsender/) |
| XSender Quarkus extension | [![Maven Central](https://img.shields.io/maven-central/v/io.github.project-openubl/quarkus-xsender)](https://search.maven.org/artifact/io.github.project-openubl/quarkus-xsender/) |

# XBuilder

Librería Java para crear XMLs basados en UBL y los estándares de la SUNAT respecto a la facturación electrónica.

XBuilder esta diseñado para que puedas crear XMLs fácilmente.

- Crea XMLs sin que necesites conocer nada sobre manejo de archivos XMLs.
- Hace cálculos internos por ti.
- Requiere solamente datos mínimos.

## ¿Qué puedes hacer con XBuilder?

- Crear XMLs
- Firmar XMLs

### Update snapshots

```shell
mvn clean test -Dxbuilder.snapshot.update
```

# XSender

Libreria para realizar envíos de comprobantes electrónicos a los servicios web de la SUNAT y/o OSCE de acuerdo a lo
Expand Down
63 changes: 23 additions & 40 deletions jreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
#
# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates
# and other contributors as indicated by the @author tags.
#
# Licensed under the Apache License - 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

project:
name: xsender
description: Libreria para enviar XMLs a la SUNAT
longDescription: Libreria para enviar comprobantes electrónicos a los servicios web de la SUNAT y/o OSCE
name: xhandler
description: Libreria para crear y enviar XMLs a la SUNAT
longDescription: Libreria para crear y enviar comprobantes electrónicos a los servicios web de la SUNAT y/o OSCE
authors:
- Carlos E. Feria Vila
license: Apache-2
java:
groupId: io.github.project.openubl.xsender
version: 11
inceptionYear: 2019
groupId: io.github.project.openubl.xhandler
version: '17'
inceptionYear: '2019'
links:
homepage: https://project-openubl.github.io/

release:
github:
owner: project-openubl
name: xsender
name: xhandler
overwrite: true
discussionCategoryName: Announcements
issues:
Expand Down Expand Up @@ -70,6 +53,22 @@ release:
- 'GitHub'
- 'dependabot'

signing:
active: ALWAYS
armored: true

deploy:
maven:
nexus2:
maven-central:
active: ALWAYS
url: https://s01.oss.sonatype.org/service/local
snapshotUrl: https://s01.oss.sonatype.org/content/repositories/snapshots/
closeRepository: true
releaseRepository: true
stagingRepositories:
- target/staging-deploy

announce:
zulip:
active: RELEASE
Expand All @@ -78,26 +77,10 @@ announce:
channel: announcements
subject: '{{projectNameCapitalized}} {{projectVersion}} released!'
message: '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
twitter:
active: RELEASE
status: '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
slack:
active: RELEASE
channel: '#notifications'
message: '🚀 {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'
mail:
active: RELEASE
mimeType: TEXT
port: 587
auth: true
host: smtp.gmail.com
username: [email protected]
from: [email protected]
to: [email protected]
subject: '{{projectNameCapitalized}} {{projectVersion}} released!'
message: |
Acabamos de lanzar {{projectNameCapitalized}} {{projectVersion}}!
{{changelog}}
article:
active: RELEASE
repository:
Expand Down
Loading

0 comments on commit 468827d

Please sign in to comment.