Skip to content

Commit

Permalink
Include dependencies (#63)
Browse files Browse the repository at this point in the history
* add api client
* remove swagger-gen from release
* test goreleaser build and golang ci lint
* add CD, remove lint test

---------

Co-authored-by: Richard Hagen <[email protected]>
  • Loading branch information
Richard87 and Richard87 authored Oct 12, 2023
1 parent 7991aae commit 0d8bfe4
Show file tree
Hide file tree
Showing 251 changed files with 57,191 additions and 6 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CD

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:

build:

runs-on: ubuntu-latest

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.21.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
workflow_dispatch:
pull_request:

permissions:
contents: read
pull-requests: read

jobs:

build:

runs-on: ubuntu-latest

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.21.2
args: build --clean --single-target --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
args: --timeout=5m --out-format=github-actions


4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,5 @@ debug
radix-cli
rx
rx-test
/generated-client/client/*
/generated-client/models/*
.idea/
.dccache
.dccache
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ builds:
dockers:
- image_templates:
- "ghcr.io/equinor/radix/rx:latest"
- "ghcr.io/equinor/radix/rx:{{ .Version}}"
dockerfile: Dockerfile.goreleaser
ids:
- rx
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ generate-client:

.PHONY: release
release:
swagger generate client -t ./generated-client -f https://api.radix.equinor.com/swaggerui/swagger.json -A radixapi
git tag -a v$(VERSION) -m "$(RELEASE_NOTE)"
git push origin v$(VERSION)
git config --global credential.helper cache
Expand All @@ -21,4 +20,4 @@ push:
docker push ghcr.io/equinor/radix/rx:latest

staticcheck:
staticcheck ./...
staticcheck ./...
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

const (
radixCLIError = "Error: Radix CLI executed with error"
version = "1.9.0"
version = "1.9.1"
)

var rootLongHelp = strings.TrimSpace(`
Expand Down
Loading

0 comments on commit 0d8bfe4

Please sign in to comment.