Skip to content

Commit 54e5c6a

Browse files
author
Olesja Aarma
committed
Merge branch 'master' of github.com:open-eid/cdoc2-auth
2 parents db3e6e2 + 4577650 commit 54e5c6a

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Build cdoc2-auth with CI
10+
11+
on:
12+
release:
13+
types: [created]
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
22+
23+
with:
24+
java-version: '17'
25+
distribution: 'temurin'
26+
overwrite-settings: true #generate settings.xml
27+
cache: maven
28+
- name: Publish with Maven
29+
run: |
30+
mvn deploy
31+
env:
32+
GITHUB_TOKEN: ${{ github.token }}

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,57 @@ CDOC2 has been tested with JDK 17 and Maven 3.8.8
2020
mvn clean install
2121
```
2222

23+
## Get from GitHub package repo
24+
25+
26+
Configure github package repo access
27+
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token
28+
29+
Example `<profile>` section of `settings.xml` for using `cdoc2-auth-token`:
30+
```xml
31+
<profile>
32+
<id>github</id>
33+
<repositories>
34+
<repository>
35+
<id>central</id>
36+
<url>https://repo1.maven.org/maven2</url>
37+
</repository>
38+
<repository>
39+
<id>github</id>
40+
<url>https://maven.pkg.github.com/open-eid/cdoc2-auth</url>
41+
</repository>
42+
</repositories>
43+
</profile>
44+
```
45+
46+
Note: When pulling, the package index is based on the organization level, not the repository level.
47+
https://stackoverflow.com/questions/63041402/github-packages-single-maven-repository-for-github-organization
48+
49+
So defining single Maven package repo from `open-eid` is enough for pulling cdoc2-* dependencies.
50+
51+
Use in Maven pom.xml:
52+
53+
```xml
54+
<dependency>
55+
<groupId>ee.cyber.cdoc2</groupId>
56+
<artifactId>cdoc2-auth-token</artifactId>
57+
<version>0.3.3-SNAPSHOT</version>
58+
</dependency>
59+
```
60+
61+
## Releasing
62+
63+
### Versioning
64+
65+
cdoc2-auth uses [semantic versioning](https://semver.org/).
66+
67+
### GitHub release
68+
69+
[Create release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release).
70+
It will trigger `maven-release.yml` workflow that will deploy Maven packages to GitHub Maven package repository
71+
and build & publish maven packages.
72+
73+
2374

2475
## cdoc2.auth-token.v1 examples
2576

@@ -126,3 +177,4 @@ Other rules to validate auth ticket:
126177
[Verifying SD-JWT (verifying authentication ticket)](https://open-eid.github.io/CDOC2/2.0-Draft/03_system_architecture/ch05_ID_authentication_protocol/#verifying-sd-jwt-verifying-authentication-ticket)
127178

128179
For additional details see tests in `src/test/java/`
180+

0 commit comments

Comments
 (0)