Repository navigation
Expand file tree
/
Copy pathrontolisp-java-wasi-config.yaml
More file actions
100 lines (96 loc) · 3.49 KB
/
Copy pathrontolisp-java-wasi-config.yaml
File metadata and controls
100 lines (96 loc) · 3.49 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: rontolisp-java-wasi-config
# wasi:config/store, the settings of a program, imported through rontolisp-java-wit's
# @WitImport, is a Maven project of its own, outside the root reactor (.kb/java-frontend.md,
# "WIT imports"): rontolisp-java-wit, its dependency, is a SNAPSHOT of this repository,
# installed first.
# Compiling a program with it is JavaWitImportTest's and the examples', in ci.yaml.
on:
push:
branches:
- develop
- main
paths:
- rontolisp-java-wasi-config/**
- rontolisp-java-wit/**
- .github/workflows/rontolisp-java-wasi-config.yaml
pull_request:
branches:
- develop
- main
paths:
- rontolisp-java-wasi-config/**
- rontolisp-java-wit/**
- .github/workflows/rontolisp-java-wasi-config.yaml
workflow_dispatch: {}
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up JDK 25
uses: actions/setup-java@v6
with:
java-version: '25'
distribution: 'liberica'
cache: maven
- name: Install the dependency
run: ./mvnw -V --no-transfer-progress -f rontolisp-java-wit/pom.xml install
- name: Build
run: ./mvnw -V --no-transfer-progress -f rontolisp-java-wasi-config/pom.xml verify
# Publishes to Maven Central once the job above passed, on a push and not on a pull
# request: a SNAPSHOT to the snapshot repository, a release by a version change only. The
# job is this workflow's own, so the module's move to a repository of its own takes it
# along; ci.yaml's deploy job is the model (.kb/session-workflow.md, "The deploy job").
deploy:
needs: [build]
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v7
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v4.0.0
with:
exportToken: true
method: jwt
url: ${{ secrets.VAULT_ADDR }}
role: cicd
secrets: |
kv/data/cicd/maven_central username | MAVEN_CENTRAL_USERNAME ;
kv/data/cicd/maven_central password | MAVEN_CENTRAL_PASSWORD ;
kv/data/cicd/gpg secring | GPG_SECRING ;
kv/data/cicd/gpg passphrase | GPG_PASSPHRASE ;
- name: Set up JDK 25
uses: actions/setup-java@v6
with:
java-version: '25'
distribution: 'liberica'
cache: maven
gpg-private-key: ${{ steps.secrets.outputs.GPG_SECRING }}
gpg-passphrase: ${{ steps.secrets.outputs.GPG_PASSPHRASE }}
# The id is the pom's `publishingServerId`.
- name: Generates Maven Settings
uses: s4u/maven-settings-action@v4.0.0
with:
servers: |
[{
"id": "sonatype-central",
"username": "${{ steps.secrets.outputs.MAVEN_CENTRAL_USERNAME }}",
"password": "${{ steps.secrets.outputs.MAVEN_CENTRAL_PASSWORD }}"
}]
- name: Install the dependency
run: ./mvnw -V --no-transfer-progress -f rontolisp-java-wit/pom.xml install
# The pom attaches the sources and the javadoc; -Psign signs them all.
- name: Deploy to Maven Central
run: |
./mvnw -V --no-transfer-progress -f rontolisp-java-wasi-config/pom.xml -Psign deploy \
-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests
- name: Revoke token
if: always()
run: |
curl -X POST -s -H "X-Vault-Token: ${VAULT_TOKEN}" ${{ secrets.VAULT_ADDR }}/v1/auth/token/revoke-self || true