Skip to content

Commit

Permalink
Merge pull request #4 from mohsenmottaghi/feat-ci-action
Browse files Browse the repository at this point in the history
feat(CI): add github action to test and release
  • Loading branch information
mohsenmottaghi authored Oct 11, 2024
2 parents 2654faf + ba81c74 commit 7a3069c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
Release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go 1.23.x
uses: actions/setup-go@v5
with:
go-version: '1.23.x'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: 'v2.3.2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Go Tests

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Go 1.23.x
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: Run tests
run: go test -v ./...
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## 0.4.0
### Added
- Add CI for testing and building the project

## 0.3.0-alpha

## 0.2.0-alpha

## 0.1.0-alpha
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

const (
version = "v0.3.0-alpha"
version = "v0.4.0"
maintainer = "The InfraZ Authors"
)

Expand Down

0 comments on commit 7a3069c

Please sign in to comment.