Skip to content

Commit

Permalink
Merge pull request #3 from juanmanuelgg/1-publicar-la-librería-en-el-…
Browse files Browse the repository at this point in the history
…maven-central-repository_Juan-Manuel

1 publicar la librería en el maven central repository juan manuel
  • Loading branch information
juanmanuelgg authored Aug 26, 2022
2 parents fbac6d7 + a4f68a4 commit 9f01fe9
Show file tree
Hide file tree
Showing 62 changed files with 41,023 additions and 14 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'

on:
push:
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
schedule:
- cron: '30 7 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['java']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
29 changes: 29 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Java Gradle CI

on:
# Puse una proteccion sobre main, ahora solo entra codigo a traves de pull_requests
# push:
# branches: ['main']
pull_request:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Publish package to the Maven Central Repository
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Publish package
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ hs_err_pid*
.gradle

# Ignore Gradle build output directory
build
build

# Environment variables
.env
44 changes: 39 additions & 5 deletions bonapata-ancheta/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
* User Manual available at https://docs.gradle.org/7.5.1/userguide/building_java_projects.html
* This project uses @Incubating APIs which are subject to change.
*/
version = "0.1.0"
version = "0.0.1"

plugins {
// Apply the java-library plugin for API and implementation separation.
`java-library`
`maven-publish`
}

repositories {
Expand Down Expand Up @@ -59,7 +60,40 @@ java {
withJavadocJar()
}

tasks.register<Copy>("copyReportsDirForArchiving") {
from("$buildDir/docs/javadoc")
into("$rootDir/docs")
}
tasks.register<Copy>("copyReportsAndJavadocForDocumentation") {
into("$rootDir")

from("$buildDir/docs"){
into("docs")
}
from("$buildDir/reports/tests"){
into("docs")
}
from("$buildDir/libs"){
into("dist")
}
}

// TODO: Me falta crear mi cuenta y terminar de ajustar el proyecto
// https://central.sonatype.org/publish/publish-guide/#introduction
/*
publishing {
publications {
create<MavenPublication>("bonapata-ancheta") {
from(components["java"])
}
}
repositories {
maven {
name = "OSSRH"
// Queda comentado porque en kotlin no funciona asi el de url
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
*/
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Documentación de bonapata-ancheta

[Javadoc](./javadoc/)
[Reports](./test/)

<span id="dial"></span>

{% include enable-react.html %}
11 changes: 11 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: Notas
author: Juan Manuel González Garzón
email: jmgonzalezgarzon@gmail.com
description: >- # this means to ignore newlines until "baseurl:"
Notas, scripts, algoritmos de uso diario y documentación de algunos proyectos.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://juanmanuelgg.github.io" # the base hostname & protocol for your site, e.g. http://example.com

remote_theme: pages-themes/hacker@v0.2.0
plugins:
- jekyll-remote-theme # add this line to the plugins list if you already have one
30 changes: 30 additions & 0 deletions docs/_includes/enable-react.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script src="https://unpkg.com/react@18/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/@bonapata/partes@0.2.11/dist/umd/partes.js" crossorigin></script>
<script>
const pathnames = new Map();
pathnames.set('/javascript', '/assets/images/js.png');
pathnames.set('/mysql', '/assets/images/mysql.png');
pathnames.set('/git', '/assets/images/git.png');
pathnames.set('/bash', '/assets/images/gnu-bash.png');
pathnames.set('/postgresql', '/assets/images/postgres.png');
pathnames.set('/firewall', '/assets/images/cortafuegos.png');
pathnames.set('/networking', '/assets/images/networking.png');
pathnames.set('/docker', '/assets/images/docker.png');
pathnames.set('/ssh', '/assets/images/ssh.png');
pathnames.set('/python', '/assets/images/python.png');
pathnames.set('/linux-basic-info', '/assets/images/linux.png');
pathnames.set('/java', '/assets/images/java.png');
pathnames.set('/java-process', '/assets/images/java-process.png');
pathnames.set('/crontab', '/assets/images/cron.png');
pathnames.set('/vim', '/assets/images/cli-file.png');
pathnames.set('/heroku-java', '/assets/images/heroku.png');
pathnames.set('/gpg', '/assets/images/privacyBorder.png');
pathnames.set('/strace', '/assets/images/strace.svg');

const props = { pathnames };
const element = React.createElement(partes.SpeedDial, props);
const container = document.getElementById('dial');

ReactDOM.render(element, container);
</script>
Loading

0 comments on commit 9f01fe9

Please sign in to comment.