Skip to content

Commit

Permalink
feat: add ipmgmt to sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Leaseweb CI committed Jan 3, 2025
1 parent 3c3be0c commit 1f00547
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 243 deletions.
59 changes: 11 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Automatic Release Workflow
name: Go Release Workflow

on:
push:
branches:
- main

jobs:
create_and_merge_pr:
name: Create and Merge PR Automatically
release:
name: Release Go Project
runs-on: ubuntu-latest

steps:
Expand All @@ -19,59 +19,22 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.18'
go-version: '1.18' # Specify your Go version

# Step 3: Run `go mod tidy` and check for changes
# Step 3: Run go mod tidy and commit changes
- name: Run go mod tidy
env:
TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
go mod tidy
git config user.name "majidkarimizadeh"
git config user.email "[email protected]"
git config --global user.name "majidkarimizadeh"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${TOKEN}@github.com/leaseweb/leaseweb-go-sdk.git
git diff --quiet || (
git checkout -b tidy-go-mod
git add go.mod go.sum
git commit -m "chore: tidy go.mod and go.sum"
git push origin HEAD
)
# Step 4: Push changes (if any) to a new branch
- name: Push changes to branch
if: success()
run: |
git diff --quiet || git push origin tidy-go-mod
# Step 5: Create a pull request
- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v5
with:
branch: tidy-go-mod
commit-message: "chore: tidy go.mod and go.sum"
title: "chore: tidy go.mod and go.sum"
body: "This PR ensures go.mod and go.sum are clean."
labels: "automerge"

# Step 6: Enable auto-merge for the PR
- name: Enable Auto-Merge
uses: "peter-evans/enable-pull-request-automerge@v2"
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ steps.create_pr.outputs.pull_request_number }}
merge-method: squash

release:
name: Release Go Project
runs-on: ubuntu-latest

steps:
# Step 1: Check out the repository
- name: Checkout repository
uses: actions/checkout@v3

# Step 2: Set up Go environment
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.18' # Specify your Go version
# Step 4: Tag the release
- name: Create a Git tag
Expand Down
12 changes: 0 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
module github.com/leaseweb/leaseweb-go-sdk

go 1.18

require (
github.com/leaseweb/leaseweb-go-sdk/abuse v0.0.0-20241230095423-e1ad88be3188
github.com/leaseweb/leaseweb-go-sdk/aggregationpack v0.0.0-20241230095423-e1ad88be3188
github.com/leaseweb/leaseweb-go-sdk/dedicatedserver v0.0.0-20241230095423-e1ad88be3188
github.com/leaseweb/leaseweb-go-sdk/dns v0.0.0-20241230095423-e1ad88be3188
github.com/leaseweb/leaseweb-go-sdk/invoice v0.0.0-20241230095423-e1ad88be3188
github.com/leaseweb/leaseweb-go-sdk/ipmgmt v0.0.0-20241230095423-e1ad88be3188
github.com/leaseweb/leaseweb-go-sdk/publiccloud v0.0.0-20241230095423-e1ad88be3188
)

require gopkg.in/validator.v2 v2.0.1 // indirect
19 changes: 0 additions & 19 deletions go.sum

This file was deleted.

24 changes: 0 additions & 24 deletions ipmgmt/.gitignore

This file was deleted.

2 changes: 2 additions & 0 deletions ipmgmt/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
api/openapi.yaml
Expand Down Expand Up @@ -44,4 +45,5 @@ model_update_null_route_opts.go
model_update_reverse_lookup_records_opts.go
model_update_reverse_lookup_records_result.go
response.go
test/api_ipmgmt_test.go
utils.go
15 changes: 0 additions & 15 deletions ipmgmt/docs/Sort.md

This file was deleted.

5 changes: 5 additions & 0 deletions ipmgmt/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ module github.com/leaseweb/leaseweb-go-sdk/ipmgmt

go 1.18

require github.com/stretchr/testify v1.10.0

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
21 changes: 10 additions & 11 deletions ipmgmt/go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
113 changes: 0 additions & 113 deletions ipmgmt/model_sort.go

This file was deleted.

1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
_ "github.com/leaseweb/leaseweb-go-sdk/dedicatedserver"
_ "github.com/leaseweb/leaseweb-go-sdk/dns"
_ "github.com/leaseweb/leaseweb-go-sdk/invoice"
_ "github.com/leaseweb/leaseweb-go-sdk/ipmgmt"
_ "github.com/leaseweb/leaseweb-go-sdk/publiccloud"
)

Expand Down

0 comments on commit 1f00547

Please sign in to comment.