-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (83 loc) · 2.43 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
name: Release
on:
push:
branches:
- main
paths-ignore:
- CHANGELOG.md
- README.md
- CONTRIBUTING.md
- renovate.json
- ".github/workflows/**"
- .releaserc.yml
- .scalafix.conf
- .scalafmt.conf
- "package*.json"
- codecov.yml
workflow_dispatch:
jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
secrets: inherit
release:
name: Release on GitHub and Maven Central
runs-on: ubuntu-20.04
env:
TERM: dumb
permissions:
contents: write
issues: write
pull-requests: write
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup scala environment
uses: olafurpg/setup-scala@v14
with:
java-version: openjdk@1.17
- name: Cache sbt
uses: actions/cache@v3
with:
path: |
~/.sbt
~/.coursier
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }}
- name: Import GPG key for signing commits and release on Maven Central
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.PGP_SECRET }}
passphrase: ${{ secrets.PGP_PASSPHRASE }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
- name: Install node
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: npm install
- name: Publish on GitHub and Maven Central
id: publish
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }}
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }}
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }}
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
- name: Generate scaladoc
run: sbt doc
- name: Publish scaladoc on GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: target/scala-3.3.0/api