Skip to content

Commit

Permalink
Publish to Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe '116' Loiseau committed Apr 26, 2024
1 parent 04313da commit 8dfd665
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ jobs:
- name: Debug
run: echo ${{ github.ref }} ; echo ${GITHUB_REF}

- name: Check
run: ./gradlew check

- name: "Gradle: Publish"
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/sovity/') }}
run: |
if [[ "$GITHUB_REF" == "refs/tags/v"* ]]; then
GRADLE_ARGS="-Pversion=${GITHUB_REF#refs/tags/v}"
./gradlew --parallel "$GRADLE_ARGS" publishAllPublicationsToAzurePackagesRepository
elif [[ "$GITHUB_REF" == "refs/heads/sovity/"* ]]; then
GRADLE_ARGS="-Pversion=${GITHUB_REF#refs/heads/sovity/}.0.$(date '+%Y%m%d.%H%M%S')"
elif [[ "$GITHUB_REF" == "refs/pull/"* ]]; then
GRADLE_ARGS="-Pversion=0.PR-$(echo $GITHUB_REF | cut -d '/' -f 3)"
./gradlew --parallel "$GRADLE_ARGS" publishAllPublicationsToAzureTestPackagesRepository
fi
./gradlew "$GRADLE_ARGS" check publishAllPublicationsToGitHubPackagesRepository
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
18 changes: 18 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ subprojects {
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}

maven {
name = "AzureTestPackages"
url = uri("https://pkgs.dev.azure.com/sovity/Test/_packaging/test/maven/v1")
credentials {
username = "sovity"
password = project.findProperty("azure.token") as String? ?: System.getenv("AZURE_TOKEN")
}
}

maven {
name = "AzurePackages"
url = uri("https://pkgs.dev.azure.com/sovity/41799556-91c8-4df6-8ddb-4471d6f15953/_packaging/core-edc/maven/v1")
credentials {
username = "sovity"
password = project.findProperty("azure.token") as String? ?: System.getenv("AZURE_TOKEN")
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
@ExtendWith(EdcExtension.class)
public class TransferProcessEventDispatchTest {

public static final Duration TIMEOUT = Duration.ofSeconds(30);
public static final Duration TIMEOUT = Duration.ofSeconds(60);
private final EventSubscriber eventSubscriber = mock(EventSubscriber.class);

@NotNull
Expand Down

0 comments on commit 8dfd665

Please sign in to comment.