-
Notifications
You must be signed in to change notification settings - Fork 92
45 lines (45 loc) · 1.47 KB
/
master-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
name: Release
on:
push:
branches: [master]
tags: ["*"]
jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'scapegoat-scala/scapegoat'
steps:
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 8
- run: |
sudo apt-get update && sudo apt-get -y install gnupg2
mkdir ~/.gnupg && chmod 700 ~/.gnupg
echo use-agent >> ~/.gnupg/gpg.conf
echo pinentry-mode loopback >> ~/.gnupg/gpg.conf
echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf
chmod 600 ~/.gnupg/*
echo RELOADAGENT | gpg-connect-agent
echo $PGP_SECRET | base64 --decode | gpg --import --no-tty --batch --yes
env:
PGP_SECRET: ${{secrets.PGP_SECRET}}
- uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ivy-${{hashFiles('**/*.sbt')}}
restore-keys: |
ivy-
- uses: actions/cache@v4
with:
path: ~/.sbt
key: sbt-${{hashFiles('**/*.sbt')}}-${{hashFiles('project/build.properties')}}
restore-keys: |
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}}