diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fc6a9e3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: Go package + +on: + push: {branches: [master]} + pull_request: {branches: [master]} + +jobs: + ci: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 'stable' + cache: 'true' + + - name: Test + run: go test -v ./... \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..9c9340d --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,23 @@ +on: + release: + types: [created] + +permissions: + contents: write + packages: write + +jobs: + releases-matrix: + name: release linux/amd64 + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, darwin] + goarch: [amd64, arm64] + steps: + - uses: actions/checkout@v4 + - uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5fa031e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: go -go: - - 1.13 -script: - - go test ./... -sudo: false -notifications: - email: false -