Skip to content

feat: add CI configs (#2) #1

feat: add CI configs (#2)

feat: add CI configs (#2) #1

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19', '1.20', '1.21']
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Run go test
run: make test
semantic-release:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run semantic-release
if: github.repository == 'casbin/casbin-go-cli' && github.event_name == 'push'
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}