Update README.md #14
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
name: Publish Go Module to pkg.go.dev | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get Latest Tag | |
uses: actions-ecosystem/action-get-latest-tag@v1 | |
id: get-latest-tag | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
- name: Authenticate with GitHub | |
run: echo "//golang.org/x/oauth2 git https://github.com/golang/oauth2" >> ~/.netrc | |
- name: Publish to Go Module Proxy | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Cashfree Payments" | |
go mod tidy | |
GOPROXY=proxy.golang.org go list -m github.com/cashfree/cashfree-pg/v3@"${{ steps.get-latest-tag.outputs.tag }}" | |
env: | |
GOPROXY: proxy.golang.org |