Skip to content

Commit 212fbf1

Browse files
Merge pull request #2 from botlify-net/dev
Dev
2 parents 0ec4248 + d8693ea commit 212fbf1

File tree

10 files changed

+437
-216
lines changed

10 files changed

+437
-216
lines changed

.github/workflows/java-compilation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ jobs:
1414
java-version: '17'
1515
distribution: 'temurin'
1616
- name: Compilation with Maven
17-
run: mvn compile
17+
run: mvn compile
18+
- name: JavaDoc
19+
run: mvn javadoc:javadoc

.github/workflows/publish-package.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,24 @@ jobs:
1212
contents: read
1313
packages: write
1414
steps:
15-
- uses: actions/checkout@v3
15+
##########################################
16+
# 1 - PUSH TO MAVEN CENTRAL
17+
##########################################
18+
# STEP 1: Install GPG key
19+
- name: Install GPG key
20+
run: |
21+
echo "Installing GNUPG..."
22+
sudo apt-get install gnupg
23+
echo "Importing GPG key..."
24+
echo -n "${{ secrets.OSSRH_GPG_PRIVATE_KEY }}" | base64 -d | gpg --batch --import
25+
echo "GPG key imported."
26+
# STEP 2: Register key to Ubuntu Keyserver
27+
- name: Register key to Ubuntu Keyserver
28+
run: gpg --keyserver keyserver.ubuntu.com --send-keys ${{ secrets.OSSRH_GPG_KEY_ID }}
29+
# STEP 3: Pull the code from the repository
30+
- name: Pull the code from the repository
31+
uses: actions/checkout@v3
32+
# STEP 4: Set up Java for publishing to Maven Central Repository
1633
- name: Set up Java for publishing to Maven Central Repository
1734
uses: actions/setup-java@v3
1835
with:
@@ -21,24 +38,24 @@ jobs:
2138
server-id: ossrh
2239
server-username: MAVEN_USERNAME
2340
server-password: MAVEN_PASSWORD
24-
- name: Install GPG key
25-
run: cat ${{ secrets.OSSRH_GPG_SECRET_KEY }} | base64 -d | gpg --batch --import
41+
# STEP 5: Publish to the Maven Central Repository
2642
- name: Publish to the Maven Central Repository
27-
run: mvn --batch-mode \
28-
clean deploy \
29-
-Dmaven.test.skip=true \
30-
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_PASSPHRASE }}
43+
run: mvn --batch-mode deploy -Dmaven.test.skip=true -Dgpg.passphrase=${{ secrets.OSSRH_GPG_PASSPHRASE }}
3144
env:
3245
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3346
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
34-
- name: Set up Java for publishing to GitHub Packages
47+
##########################################
48+
# 2 - PUSH TO GITHUB PACKAGE
49+
##########################################
50+
# STEP 1: Set up Java for publishing to Maven Central Repository
51+
- name: Set up Java for publishing to GitHub Package
3552
uses: actions/setup-java@v3
3653
with:
3754
java-version: '17'
38-
distribution: 'temurin'
55+
distribution: 'adopt'
56+
server-id: github
57+
# STEP 2: Publish to GitHub Packages
3958
- name: Publish to GitHub Packages
40-
run: mvn --batch-mode \
41-
clean deploy \
42-
-Dmaven.test.skip=true
59+
run: mvn --batch-mode deploy -Dmaven.test.skip=true -P "github"
4360
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ jobs:
1515
- name: Pull the code from the repository
1616
uses: actions/checkout@v3
1717
# Set up JDK 17 for the build (maven included).
18-
- name: Set up JDK 17
18+
- name: Set up Java for publishing to GitHub Package
1919
uses: actions/setup-java@v3
2020
with:
2121
java-version: '17'
22-
distribution: 'temurin'
22+
distribution: 'adopt'
23+
server-id: github
2324
# Build the project with Maven.
2425
- name: Compilation with Maven
2526
run: mvn compile

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,7 @@ logs
4545
/secret.txt
4646
decode.sh
4747
base64privKey.txt
48+
privKey.pem
49+
pubKey
50+
private.pgp
4851
privKey.pem

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
Features:
2-
- Add zone management to the API.
3-
- Add the request to get account balance to the account api.
1+
Fix:
2+
- Set CreateZoneRequest to return the instance of the request on the setters.

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Generic Makefile for Botlify
66
##
77

8-
.PHONY: all test clean fclean re doc
8+
.PHONY: all test clean fclean install finstall re doc
99

1010
#=================================
1111
# Commands
@@ -21,8 +21,14 @@ test:
2121
clean:
2222
mvn clean
2323

24+
fclean:
25+
rm -rf target
26+
27+
install:
28+
mvn install
29+
2430
finstall:
2531
mvn install -Dmaven.test.skip=true
2632

2733
doc:
28-
mvn javadoc:javadoc
34+
mvn javadoc:javadoc

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Bright-data API
22

3-
[![Latest release](https://img.shields.io/github/release/botlify-net/bright-data-api.svg)](https://github.com/botlify-io/bright-data-api/releases/latest)
4-
[![Build Status](https://github.com/botlify-net/bright-data-api/workflows/Java%20CI/badge.svg?branch=master)](https://github.com/botlify-io/guava/bright-data-api/actions)
3+
[![Latest release](https://img.shields.io/github/release/botlify-net/bright-data-api.svg)](https://github.com/botlify-net/bright-data-api/releases/latest)
4+
[![Build Status](https://github.com/botlify-net/bright-data-api/workflows/Java%20CI/badge.svg?branch=master)](https://github.com/botlify-net/bright-data-api/actions)
55

66
This project is a Java client for the BrightData API, which allows you to access the
77
BrightData API from your Java application without having to deal with the HTTP requests.

0 commit comments

Comments
 (0)