-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (55 loc) · 2.36 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on: [push]
jobs:
validate_pr:
runs-on: ubuntu-20.04
strategy:
matrix:
vocab: [
"common-rdf/vocab-common-rdf.yml",
"solid-rdf/vocab-solid.yml",
"inrupt-rdf/Core/vocab-inrupt-core.yml",
"inrupt-rdf/Glossary/vocab-inrupt-glossary.yml",
"inrupt-rdf/Test/vocab-inrupt-test.yml"
]
name: CI for ${{ matrix.vocab }}
steps:
# Setup.
- name: Checkout repo
uses: actions/checkout@v4
# Initializes node for the runner.
- name: Node setup
uses: actions/setup-node@v3
with:
node-version: '16.16.0'
registry-url: https://registry.npmjs.com/
scope: '@inrupt'
# The following step sets up Maven.
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: 11
distribution: 'temurin'
# These values are used in the `settings.xml` Maven config file.
server-id: cloudsmith-development # Value of the distributionManagement/repository/id field of the pom.xml
server-username: ${{ secrets.CLOUDSMITH_USERNAME }}
server-password: ${{ secrets.CLOUDSMITH_PASSWORD }}
- name: Generate proper Maven settings
uses: ./.github/fill-template
with:
template-path: ./.github/maven-settings.hbs
output-path: ./settings.xml
env:
SERVER_ID_RELEASE: cloudsmith-staging
SERVER_URL_RELEASE: https://maven.cloudsmith.io/inrupt/sdk-staging/
SERVER_ID_SNAPSHOT: cloudsmith-development
SERVER_URL_SNAPSHOT: https://maven.cloudsmith.io/inrupt/sdk-development/
SERVER_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
SERVER_PASSWORD: ${{ secrets.CLOUDSMITH_PASSWORD }}
# The following action is defined in the current repository.
# It reads the expected generator version from the YAML file.
- name: Get generator version
uses: ./.github/artifact-generator-version/
id: generator-version-common
with:
vocab-config-path: ${{ matrix.vocab }}
- run: npx @inrupt/artifact-generator@${{steps.generator-version-common.outputs.vocab-generator-version}} generate -l ${{ matrix.vocab }} --noPrompt