Skip to content

Commit

Permalink
Add initial GH Action for CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
carpeliam committed Jan 20, 2025
1 parent 3e94384 commit 41af16c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI/CD

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.1

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: test
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.1

- name: Build
run: go build -v -o sc .

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
sc
LICENSE

0 comments on commit 41af16c

Please sign in to comment.