Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub CI actions #5

Merged
merged 6 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
*.java ident
*.xml ident
*.png binary
37 changes: 37 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Maven Build
"on":
push:
branches:
- master
pull_request:
branches:
- master
jobs:
maven-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java: [17, 21]
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-jdk-${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-jdk-${{ matrix.java }}-maven-
- name: Build it with Maven
run: |
cd mvn-resolver-transport-http3
mvn -B verify
xcop-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: g4s8/xcop-action@master
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Create Maven release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build release
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-java@v2
with:
java-version: 17
distribution: adopt
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Set env
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set version
run: mvn -B versions:set -DnewVersion=${{ env.TAG }} versions:commit
- name: Create settings.xml
uses: whelk-io/maven-settings-xml-action@v15
with:
servers: |
[
{
"id": "oss.sonatype.org",
"username": "${{ secrets.SONATYPE_USER }}",
"password": "${{ secrets.SONATYPE_PASSWORD }}"
}
]
profiles: |
[
{
"id": "artipie",
"properties": {
"gpg.keyname": "${{ secrets.GPG_KEYNAME }}",
"gpg.passphrase": "${{ secrets.GPG_PASSPHRASE }}"
}
}
]
- name: Deploy artifacts
run: |
cd mvn-resolver-transport-http3
mvn deploy -Partipie,publish,sonatype,gpg-sign -DskipITs --errors
- name: Create Github Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ env.TAG }}
draft: false
prerelease: false
23 changes: 23 additions & 0 deletions .github/workflows/update-copyright-years.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Update copyright year

on:
schedule:
- cron: '0 1 1 * *' # Runs at 01:00 UTC on the 1st of every month

jobs:
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: FantasticFiasco/action-update-license-year@v2
with:
token: ${{ secrets.LICENSE_SECRET }}
path: | #add new path with glob pattern https://www.npmjs.com/package/glob
**/LICENSE*
**/*.java
**/*.rb
**/*.xml
.release/*
commitTitle: "chore: update license year"
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020-2023 Artipie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 3 additions & 2 deletions mvn-resolver-transport-http3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
<Bundle-SymbolicName>${Automatic-Module-Name}</Bundle-SymbolicName>
<jettyVersion>12.0.1</jettyVersion>
<spotless.check.skip>true</spotless.check.skip>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Jetty http3 is JDK17+ -->
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
Expand Down
Loading