Skip to content

Commit c5f8f6f

Browse files
authored
feat: Initial setup of project (#1)
* feat: Adds inital repository information * feat: Adds github actions for publish, dependabot and pages * fix: Changes path to schemas * fix: Updated .gitignore * fix: Update pom.xml * feat: Testings workflow * feat: Test publish to snapshot repository * feat: Change from OSSRH to central portal * feat: Change from OSSRH to central portal with gpg sign * fix: Bump gpg-sign plugin * feat: Remove snapshot * feat: Update plugin dependencies * fix: Change version of central-publish-plugin and mvn deploy command * fix: Revert changes in yml files * feat: Only publish on release. Build on main and feature branches * feat: Test combine steps * fix publish * feat: Bump version for release after merge to main * feat: Update workflows * feat: Change filename from linting to lint.yml * fix: removes .php from license link * fix: Corrects url of site * fix: Changes kroki url * docs: Updates docs * feat: Updates workflows * feat: Adds check for tag when release and workflow dispatch for build * fix: Check for tag * feat: Updates after review
1 parent 27d3c56 commit c5f8f6f

22 files changed

Lines changed: 992 additions & 0 deletions

‎.github/dependabot.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "maven" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "daily"

‎.github/workflows/build.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
workflow_call:
3+
workflow_dispatch:
4+
push:
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- synchronize
10+
11+
jobs:
12+
linting:
13+
name: Check linting
14+
uses: ./.github/workflows/lint.yml
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Build and run tests
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: "21"
23+
distribution: "temurin"
24+
- run: mvn clean verify
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Check rules for release
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
check-release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check branch and tag
10+
if: github.event_name == 'push' && !(github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/'))
11+
run: exit 1

‎.github/workflows/lint.yml‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
linting:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up JDK
15+
uses: actions/setup-java@v3
16+
with:
17+
distribution: "temurin"
18+
java-version: "21"
19+
20+
- name: Run linting
21+
run: mvn clean validate
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish to GitHub Pages
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types: [created]
6+
push:
7+
branches:
8+
- main
9+
10+
concurrency:
11+
group: github-pages
12+
cancel-in-progress: false
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
jobs:
19+
publish_gh_pages:
20+
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
- name: Configure Pages
28+
uses: actions/configure-pages@v3
29+
- name: Install Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: "18"
33+
- name: Install Antora
34+
run: npm i antora
35+
- name: Install Asciidoctor Kroki extension
36+
run: npm i asciidoctor asciidoctor-kroki
37+
- name: Generate Site
38+
run: npx antora docs/antora-playbook.yml
39+
- name: Create site folders
40+
run: mkdir -p docs/build/site
41+
- name: Upload Artifacts
42+
uses: actions/upload-pages-artifact@v2
43+
with:
44+
path: docs/build/site
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v2
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
check-release:
8+
name: Reuse check release
9+
uses: ./.github/workflows/check_release.yml
10+
build:
11+
name: Reuse build
12+
uses: ./.github/workflows/build.yml
13+
publish:
14+
needs:
15+
- build
16+
- check-release
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Java for publishing to Maven Central Repository
24+
uses: actions/setup-java@v3
25+
with:
26+
java-version: "21"
27+
distribution: "temurin"
28+
server-id: central
29+
server-username: MAVEN_USERNAME
30+
server-password: MAVEN_PASSWORD
31+
gpg-private-key: ${{ secrets.SYSDEV_PRIVATE_GPG_KEY }}
32+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
33+
- name: Publish to the Maven Central Repository
34+
run: mvn clean deploy
35+
env:
36+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
37+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
38+
MAVEN_GPG_PASSPHRASE: ${{ secrets.SYSDEV_PRIVATE_GPG_KEY_PASSPHRASE }}

‎.gitignore‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/java,maven
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=java,maven
3+
4+
### Java ###
5+
# Compiled class file
6+
*.class
7+
8+
# Log file
9+
*.log
10+
11+
# Package Files #
12+
*.jar
13+
*.war
14+
*.nar
15+
*.ear
16+
*.zip
17+
*.tar.gz
18+
*.rar
19+
20+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
21+
hs_err_pid*
22+
replay_pid*
23+
24+
### Maven ###
25+
target/
26+
pom.xml.tag
27+
pom.xml.releaseBackup
28+
pom.xml.versionsBackup
29+
pom.xml.next
30+
release.properties
31+
dependency-reduced-pom.xml
32+
buildNumber.properties
33+
.mvn/timing.properties
34+
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
35+
.mvn/wrapper/maven-wrapper.jar
36+
37+
# Eclipse m2e generated files
38+
# Eclipse Core
39+
.project
40+
# JDT-specific (Eclipse Java Development Tools)
41+
.classpath
42+
43+
# End of https://www.toptal.com/developers/gitignore/api/java,maven
44+
45+
### VisualStudioCode ###
46+
.vscode/*
47+

‎README.adoc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include::docs/modules/ROOT/pages/index.adoc[]

‎docs/antora-playbook.yml‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/asciidoctor/asciidoctor-intellij-plugin/main/src/main/resources/jsonSchemas/antoraPlaybookSchema.json
2+
3+
site:
4+
title: Reqstool Maven Plugin
5+
url: https://github.com/luftfartsverket/reqstool-java-maven-plugin
6+
start_page: reqstool-java-maven-plugin::index.adoc
7+
8+
content:
9+
sources:
10+
- url: ~+
11+
branches: HEAD
12+
start_path: docs
13+
ui:
14+
bundle:
15+
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
16+
snapshot: true
17+
supplemental_files:
18+
- path: ui.yml
19+
contents: |
20+
static_files:
21+
- .nojekyll
22+
- path: .nojekyll
23+
asciidoc:
24+
attributes:
25+
kroki-server-url: https://kroki.io
26+
kroki-fetch-diagram: true
27+
extensions:
28+
- asciidoctor-kroki
29+
30+
31+

‎docs/antora.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/asciidoctor/asciidoctor-intellij-plugin/main/src/main/resources/jsonSchemas/antoraComponentSchema.json
2+
3+
name: reqstool-maven-plugin
4+
title: Reqstool Maven Plugin
5+
version: 0.0.3
6+
nav:
7+
- modules/ROOT/nav.adoc

0 commit comments

Comments
 (0)