-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (94 loc) · 3.28 KB
/
release.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
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
name: Release
on:
push:
branches: [main]
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'sbt'
- 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@v4
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'sbt'
- name: 'Build plugins'
run: |
sbt -v +jenaPlugin/assembly +rdf4jPlugin/assembly
LATEST_SCALA_VERSION=`ls -1 jena-plugin/target | grep scala- | sort -V | tail -n1`
echo "LATEST_SCALA_VERSION=$LATEST_SCALA_VERSION" >> $GITHUB_ENV
- name: 'Publish plugins (pre-release)'
if: github.ref == 'refs/heads/main'
uses: ncipollo/[email protected]
with:
allowUpdates: true
prerelease: true
draft: false
omitDraftDuringUpdate: false
makeLatest: false
tag: dev
name: "Development build"
artifacts: 'jena-plugin/target/${{ env.LATEST_SCALA_VERSION }}/*-plugin.jar,rdf4j-plugin/target/${{ env.LATEST_SCALA_VERSION }}/*-plugin.jar'
generateReleaseNotes: true
- name: 'Publish plugins (tagged release)'
if: github.ref != 'refs/heads/main'
uses: ncipollo/[email protected]
with:
prerelease: false
draft: false
makeLatest: true
tag: "${{ github.ref_name }}"
name: "${{ github.ref_name }}"
artifacts: 'jena-plugin/target/${{ env.LATEST_SCALA_VERSION }}/*-plugin.jar,rdf4j-plugin/target/${{ env.LATEST_SCALA_VERSION }}/*-plugin.jar'
generateReleaseNotes: true
publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
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 [email protected]
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