Skip to content

Commit 759f777

Browse files
author
mdwairi
committed
fix: update repo actions
1 parent 57cb4b8 commit 759f777

File tree

6 files changed

+113
-33
lines changed

6 files changed

+113
-33
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-test-xap-sdk:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Setup JDK 8
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'temurin'
19+
java-version: '1.8'
20+
21+
- name: Build and Test
22+
run: ./gradlew clan build
23+
24+
run-integration-tests:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Run Integration Tests
28+
uses: ./.github/workflows/run-integration-tests.yaml
29+
with:
30+
branch: main
31+
jdk: '1.8'
32+
distribution: 'corretto'
33+

.github/workflows/generate-docs-site.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
deploy-reference-docs:
17-
uses: "ExpediaGroup/expediagroup-java-sdk/.github/workflows/generate-ref-docs.yaml@feature/new-sdk-core"
17+
uses: "ExpediaGroup/expediagroup-java-sdk/.github/workflows/generate-ref-docs.yaml@main"
1818
with:
1919
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
2020
sources_dir: 'xap-sdk'
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Manual Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
run-examples:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Run Examples
14+
uses: ./.github/workflows/run-examples.yaml
15+
with:
16+
branch: main
17+
jdk: '1.8'
18+
distribution: 'corretto'
19+
20+
run-integration-tests:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Run Integration Tests
24+
uses: ./.github/workflows/run-integration-tests.yaml
25+
with:
26+
branch: main
27+
jdk: '1.8'
28+
distribution: 'corretto'
29+
30+
publish-to-maven-central:
31+
runs-on: ubuntu-latest
32+
needs: [run-examples, run-integration-tests]
33+
steps:
34+
- name: Checkout Repository
35+
uses: actions/checkout@v4
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Setup JDK 8
40+
uses: actions/setup-java@v4
41+
with:
42+
distribution: 'corretto'
43+
java-version: '1.8'
44+
45+
- name: Build and Test
46+
run: ./gradlew clean build
47+
48+
- name: Publish xap-sdk module
49+
env:
50+
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
51+
GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
52+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
53+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
54+
run: |
55+
echo "Publishing xap-sdk"
56+
./gradlew :xap-sdk:publishToSonatype closeAndReleaseSonatypeStagingRepository
57+
58+
- name: Publish Summary
59+
run: |
60+
echo "✅ Successfully published xap-sdk to Maven Central" >> $GITHUB_STEP_SUMMARY

.github/workflows/release-sdk-snapshot.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,27 @@ name: Snapshot Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: 'Branch to release a snapshot from'
8+
required: true
9+
type: string
510

611
jobs:
712
release:
813
runs-on: ubuntu-latest
914
steps:
1015
- name: Checkout
1116
uses: actions/checkout@v4
17+
18+
- name: Setup JDK 8
19+
uses: actions/setup-java@v4
1220
with:
13-
fetch-depth: 0
14-
ref: "v2-dev"
21+
distribution: 'corretto'
22+
java-version: '1.8'
23+
24+
- name: Clean and Build
25+
run: ./gradlew clean build
1526

1627
- name: Publish SDK
1728
env:

.github/workflows/release-sdk-stable.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

build.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@ subprojects {
7979
nexusPublishing {
8080
repositories {
8181
sonatype {
82-
username.set(System.getenv("SONATYPE_USERNAME"))
83-
password.set(System.getenv("SONATYPE_PASSWORD"))
82+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
83+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
84+
username = System.getenv("SONATYPE_USERNAME")
85+
password = System.getenv("SONATYPE_PASSWORD")
8486
}
8587
}
8688

8789
transitionCheckOptions {
88-
maxRetries.set(60)
89-
delayBetween.set(Duration.ofMillis(5000))
90+
maxRetries = 60
91+
delayBetween = Duration.ofMillis(5000)
9092
}
9193
}

0 commit comments

Comments
 (0)