Skip to content

Commit 2e5e188

Browse files
committed
Release workflow
1 parent 7e82838 commit 2e5e188

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
permissions:
6+
contents: read
7+
pages: write
8+
id-token: write
9+
jobs:
10+
deploy-artifact:
11+
if: ${{ github.repository_owner == 'reactiverse'}} && false
12+
runs-on: ubuntu-latest
13+
env:
14+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
15+
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
16+
MAVEN_GPG_KEY: ${{ secrets.GPG_SIGNING_KEY }}
17+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
ref: ${{ github.release.tag_name }}
23+
- name: Install JDK
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: 11
27+
distribution: temurin
28+
server-id: central
29+
server-username: CENTRAL_USERNAME
30+
server-password: CENTRAL_PASSWORD
31+
- name: Maven deploy
32+
run: mvn deploy -DskipTests -B -Dgpg.signer=bc
33+
package-docs:
34+
if: ${{ github.repository_owner == 'reactiverse'}}
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
with:
40+
ref: ${{ github.release.tag_name }}
41+
- name: Install JDK
42+
uses: actions/setup-java@v4
43+
with:
44+
java-version: 11
45+
distribution: temurin
46+
- name: Build docs
47+
run: mvn package site -DskipTests -B
48+
- name: Build docs with Jekyll
49+
uses: actions/jekyll-build-pages@v1
50+
with:
51+
source: ./docs/
52+
destination: ./_site
53+
- name: Upload docs as artifact
54+
id: deployment
55+
uses: actions/upload-pages-artifact@v3
56+
deploy-docs:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: package-docs
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4
66+

0 commit comments

Comments
 (0)