Skip to content

Add initial GH Action for CI/CD #1

Add initial GH Action for CI/CD

Add initial GH Action for CI/CD #1

Workflow file for this run

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