diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e69de29..d257211 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -0,0 +1,36 @@ +name: release + +on: + push: + tags: + - 'v*' + + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Install syft + run: curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin + - name: Checkout + uses: actions/checkout@v6 + - name: Go setup + uses: actions/setup-go@v6 + with: + go-version: '1.25' + - name: Install deps + run: go mod tidy + - name: Golangci-lint + uses: golangci/golangci-lint-action@v9.2.0 + with: + args: --timeout=5m + - name: Run tests + run: go test ./... + - name: GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e69de29..edbd69f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: ci.yml + +on: + push: + branches: + - master + + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Go setup + uses: actions/setup-go@v6 + with: + go-version: '1.25.7' + - name: Install deps + run: go mod tidy + - name: Run tests + run: go test ./... + - name: Build + run: go build ./...