-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (74 loc) · 2.32 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:
tags:
- '*'
env:
GH_JAVA_VERSION: "adopt@1.8"
GH_SCALA_BINARY_VERSION: "2.12"
jobs:
gh-release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
with:
java-version: ${{ env.GH_JAVA_VERSION }}
- name: Cache SBT
uses: actions/cache@v4
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-
- name: sbt GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_AUTH_TOKEN_GITHUB }}
run: |
echo "Run] sbt GitHub release"
echo 'sbt -J-XX:MaxMetaspaceSize=1024m -J-Xmx2048m devOopsGitHubRelease'
sbt \
-J-XX:MaxMetaspaceSize=1024m \
-J-Xmx2048m \
devOopsGitHubRelease
publish:
needs: gh-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v14
with:
java-version: ${{ env.GH_JAVA_VERSION }}
- name: Cache SBT
uses: actions/cache@v4
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-
- name: sbt Publish sbt-github-pages
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: |
echo "Run] Publish to Maven Central"
echo 'sbt -J-XX:MaxMetaspaceSize=1024m -J-Xmx2048m -v clean test ci-release"'
sbt \
-J-XX:MaxMetaspaceSize=1024m \
-J-Xmx2048m \
-v \
clean \
test \
ci-release
echo "====================="