-
Notifications
You must be signed in to change notification settings - Fork 7
129 lines (115 loc) · 3.86 KB
/
Copy pathrelease.yml
File metadata and controls
129 lines (115 loc) · 3.86 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Release
on:
push:
branches: [main]
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v6.0.0
with:
distribution: 'temurin'
java-version: '25'
cache: 'sbt'
- name: Setup SBT
uses: sbt/setup-sbt@v1
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
publish-plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v6.0.0
with:
distribution: 'temurin'
java-version: '25'
cache: 'sbt'
- name: Setup SBT
uses: sbt/setup-sbt@v1
- name: 'Build plugins'
run: |
# neo4jPlugin is not built – it cannot work with RDF4J 6. See build.sbt.
sbt -v "+jenaPlugin/assembly; +rdf4jPlugin/assembly"
- name: 'Build conformance reports'
run: |
JELLY_DATE=$(date -I)
if [ $JELLY_VERSION = "refs/heads/main" ]; then
JELLY_VERSION="dev"
fi
sbt "integrationTests/testOnly *ProtocolConformanceSpec -- -C eu.neverblink.jelly.integration_tests.util.ConformanceReporter"
cd integration-tests/target
tar -czf conformance_reports.tar.gz reports/
cd ../..
env:
JELLY_VERSION: ${{ github.ref }}
- name: 'Publish plugins (pre-release)'
if: github.ref == 'refs/heads/main'
uses: ncipollo/release-action@v1.21.0
with:
allowUpdates: true
prerelease: true
draft: false
omitDraftDuringUpdate: false
makeLatest: false
tag: dev
name: "Development build"
artifacts: >-
jena-plugin/target/*-plugin.jar,
rdf4j-plugin/target/*-plugin.jar,
integration-tests/target/conformance_reports.tar.gz
generateReleaseNotes: true
- name: 'Publish plugins (tagged release)'
if: github.ref != 'refs/heads/main'
uses: ncipollo/release-action@v1.21.0
with:
prerelease: false
draft: false
makeLatest: true
tag: "${{ github.ref_name }}"
name: "${{ github.ref_name }}"
artifacts: >-
jena-plugin/target/*-plugin.jar,
rdf4j-plugin/target/*-plugin.jar,
integration-tests/target/conformance_reports.tar.gz
generateReleaseNotes: true
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version: '3.12'
cache: pip
cache-dependency-path: 'docs/requirements.txt'
- name: Install dependencies
working-directory: ./docs
run: pip install -r requirements.txt
- name: Deploy site
working-directory: ./docs
run: |
export TAG='${{ github.ref_name }}'
git fetch origin gh-pages --depth=1
git config user.name ci-bot
git config user.email ci-bot@example.com
if [[ $TAG == v* ]] ; then
V_MAJOR=`echo ${TAG#v} | awk -F '.' '{print $1}'`
V_MINOR=`echo ${TAG#v} | awk -F '.' '{print $2}'`
mike deploy --push --alias-type=redirect --update-aliases "${V_MAJOR}.${V_MINOR}.x" stable "${TAG#v}"
else
mike deploy --push --alias-type=redirect --title "Development version" --update-aliases dev latest
fi