Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from postmanlabs/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
piyush-daga authored Apr 14, 2023
2 parents a6c4a9d + e1636c2 commit 145c376
Show file tree
Hide file tree
Showing 37 changed files with 2,211 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,

* @piyush-daga
* @gmann42
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release Go SDK

on:
push:
branches:
- master

jobs:
release:
name: Release and Tag Go SDK
runs-on: ubuntu-latest
steps:
- name: Generate token # https://postman.slack.com/archives/C0477Q3P1N1/p1669979360729249
id: generate_token
uses: postmanlabs/github-app-token@v1
with:
app_id: ${{ secrets.DISTRIBUTION_BOT_ID }}
private_key: ${{ secrets.DISTRIBUTION_BOT_CERT }}

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get latest tag
id: latest_tag
run: |
latest_tag=$(git tag | grep v | sort -V | tail -1)
echo $latest_tag
echo "latest_tag=$latest_tag" >> "$GITHUB_OUTPUT"
- name: Get current version
id: current_version
uses: michmich112/extract-version@main
with:
version-file: ./postmansdk/version.go
schema: major.minor.build

- name: Set tag candidate
id: set_tag
run: |
new_tag=v${{ steps.current_version.outputs.version }}
echo $new_tag
echo "new_tag=$new_tag" >> "$GITHUB_OUTPUT"
- name: Version check result
if: steps.latest_tag.outputs.latest_tag == steps.set_tag.outputs.new_tag
uses: actions/github-script@v3
with:
script: |
core.setFailed('Version is not updated - please bump on `version.go`')
- name: Push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ steps.generate_token.outputs.token }}
custom_tag: ${{ steps.set_tag.outputs.new_tag }}
tag_prefix: ''

- name: Create a GitHub release
uses: postman-eng/action-gh-release@v1
with:
token: ${{ steps.generate_token.outputs.token }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
generate_release_notes: true
20 changes: 20 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Security Scan

on:
push:
branches: [ master,develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master,develop ]
schedule:
- cron: '0 0 * * 2'
workflow_dispatch:

jobs:
scanjob:
name: Security Scan Job
uses: postmanlabs/gh-security-scan-workflow/.github/workflows/[email protected]
secrets: inherit
with:
imagename: postman-go-sdk
language: "['go']"
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt

ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: weekly
skip: []
submodules: false
49 changes: 49 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module github.com/postmanlabs/postman-go-sdk

go 1.20

require (
github.com/gin-gonic/gin v1.9.0
github.com/sirupsen/logrus v1.9.0
go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.40.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0
go.opentelemetry.io/otel/sdk v1.14.0
go.opentelemetry.io/otel/trace v1.14.0
)

require (
github.com/bytedance/sonic v1.8.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.11.2 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.9 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 145c376

Please sign in to comment.