Go implementation of pdsadmin cli

ci: add build and release jobs

+141
+15
.github/dependabot.yaml
··· 1 + # To get started with Dependabot version updates, you'll need to specify which 2 + # package ecosystems to update and where the package manifests are located. 3 + # Please see the documentation for all configuration options: 4 + # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 + 6 + version: 2 7 + updates: 8 + - package-ecosystem: "gomod" # See documentation for possible values 9 + directory: "/pdsadmin" # Location of package manifests 10 + schedule: 11 + interval: "weekly" 12 + - package-ecosystem: "github-actions" 13 + directory: "/" 14 + schedule: 15 + interval: "weekly"
+26
.github/workflows/go.yaml
··· 1 + name: go 2 + on: 3 + push: 4 + branches: 5 + - main 6 + pull_request: 7 + branches: 8 + - main 9 + 10 + permissions: 11 + contents: read 12 + 13 + jobs: 14 + build: 15 + runs-on: ubuntu-latest 16 + steps: 17 + - uses: actions/checkout@v4 18 + - name: setup go environment 19 + uses: actions/setup-go@v5 20 + with: 21 + go-version: "1.24" 22 + check-latest: true 23 + - name: build 24 + run: go build -C pdsadmin -v ./... 25 + - name: test 26 + run: go test -C pdsadmin -v ./...
+23
.github/workflows/golangci-lint.yaml
··· 1 + name: golangci-lint 2 + on: 3 + push: 4 + branches: 5 + - main 6 + pull_request: 7 + 8 + permissions: 9 + contents: read 10 + 11 + jobs: 12 + golangci: 13 + name: lint 14 + runs-on: ubuntu-latest 15 + steps: 16 + - uses: actions/checkout@v4 17 + - uses: actions/setup-go@v5 18 + with: 19 + go-version: "1.24" 20 + - name: golangci-lint 21 + uses: golangci/golangci-lint-action@v8 22 + with: 23 + working-directory: pdsadmin
+20
.github/workflows/goreleaser.yaml
··· 1 + name: goreleaser 2 + on: 3 + push: 4 + tags: 5 + - "*" 6 + 7 + permissions: 8 + contents: write 9 + 10 + jobs: 11 + goreleaser: 12 + runs-on: ubuntu-latest 13 + steps: 14 + - uses: actions/checkout@v4 15 + - uses: actions/setup-go@v5 16 + - name: run goreleaser 17 + uses: goreleaser/goreleaser-action@v6 18 + with: 19 + args: release --clean 20 + workdir: pdsadmin
+57
pdsadmin/.goreleaser.yaml
··· 1 + # This is an example .goreleaser.yml file with some sensible defaults. 2 + # Make sure to check the documentation at https://goreleaser.com 3 + 4 + # The lines below are called `modelines`. See `:help modeline` 5 + # Feel free to remove those if you don't want/need to use them. 6 + # yaml-language-server: $schema=https://goreleaser.com/static/schema.json 7 + # vim: set ts=2 sw=2 tw=0 fo=cnqoj 8 + 9 + version: 2 10 + 11 + before: 12 + hooks: 13 + # You may remove this if you don't use go modules. 14 + - go mod tidy 15 + # you may remove this if you don't need go generate 16 + - go generate ./... 17 + 18 + builds: 19 + - env: 20 + - CGO_ENABLED=0 21 + goos: 22 + - linux 23 + # - windows 24 + # - darwin 25 + goarch: 26 + - amd64 27 + - arm64 28 + 29 + archives: 30 + - formats: [tar.gz] 31 + # this name template makes the OS and Arch compatible with the results of `uname`. 32 + name_template: >- 33 + {{ .ProjectName }}_ 34 + {{- title .Os }}_ 35 + {{- if eq .Arch "amd64" }}x86_64 36 + {{- else if eq .Arch "386" }}i386 37 + {{- else }}{{ .Arch }}{{ end }} 38 + {{- if .Arm }}v{{ .Arm }}{{ end }} 39 + # use zip for windows archives 40 + format_overrides: 41 + - goos: windows 42 + formats: [zip] 43 + 44 + changelog: 45 + sort: asc 46 + filters: 47 + exclude: 48 + - "^docs:" 49 + - "^test:" 50 + - "^chore:" 51 + 52 + release: 53 + footer: >- 54 + 55 + --- 56 + 57 + Released by [GoReleaser](https://github.com/goreleaser/goreleaser).