Skip to content

Commit

Permalink
publishes jar to github packages
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnysideup committed Jan 27, 2022
1 parent a22042c commit d6e07f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,12 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: hephaestus-client-java.jar
path: sdks/java/target/*.jar
if-no-files-found: error

- name: Publish Java JAR
run: docker run --rm -v $HOME/.m2:/root/.m2 -v $(pwd)/sdks/java:/wd --workdir /wd maven:3-openjdk-8 mvn -s settings.xml deploy -DskipTests -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/dominodatalab/hephaestus
env:
JAVA_SDK_MAVEN_USERNAME: ${{ github.actor }}
JAVA_SDK_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
6 changes: 1 addition & 5 deletions scripts/sdk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func processRawJSON(path string) (*spec.Swagger, error) {
}

// modifyRoutes gathers project routes, modifies their operations, and sets them on the swagger object.
func modifyRoutes(swagger *spec.Swagger) error {
func modifyRoutes(swagger *spec.Swagger) {
paths := map[string]spec.PathItem{}

for name, item := range swagger.Paths.Paths {
Expand All @@ -87,8 +87,6 @@ func modifyRoutes(swagger *spec.Swagger) error {
tags = []string{"ImageBuildService"}
case strings.Contains(name, "imagecaches"):
tags = []string{"ImageCacheService"}
default:
return fmt.Errorf("unknown service %q", name)
}

if item.Get != nil {
Expand All @@ -110,8 +108,6 @@ func modifyRoutes(swagger *spec.Swagger) error {
paths[name] = item
}
swagger.Paths.Paths = paths

return nil
}

// modifyOperation affects generated function names and the generated services where they will reside.
Expand Down

0 comments on commit d6e07f2

Please sign in to comment.