-
Notifications
You must be signed in to change notification settings - Fork 155
52 lines (48 loc) · 1.5 KB
/
branch-snapshot.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
name: Build a Branch Specific Snapshot
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_EVENT: ${{ github.event_name }}
BRANCH_SNAPSHOT: ${{ github.ref_name }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GODEBUG: x509sha1=1
steps:
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
- name: Setup GO
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
- name: Install Nats Server
run: |
cd $GITHUB_WORKSPACE
git clone https://github.com/nats-io/nats-server.git
cd nats-server
go get
go build main.go
mkdir -p ~/.local/bin
cp main ~/.local/bin/nats-server
cd ..
rm -rf nats-server
nats-server -v
- name: Check out code
uses: actions/checkout@v4
- name: Build and Test
run: chmod +x gradlew && ./gradlew clean test jacocoTestReport coveralls
- name: Verify Javadoc
if: ${{ success() }}
run: ./gradlew javadoc
- name: Publish Branch Snapshot
if: ${{ success() }}
run: ./gradlew -i publishToSonatype