-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Leaseweb CI
committed
Jan 3, 2025
1 parent
3c3be0c
commit 1f00547
Showing
10 changed files
with
28 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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= |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters