diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..812390b3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: release + +on: + push: + tags: + - "v[0-9]+\.[0-9]+\.[0-9]+" + +jobs: + release: + name: release + steps: + - uses: actions/setup-go@v2 + with: + go-version: 1.16.x + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Test + run: go test -cover ./... + - uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..2bf47c79 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: test + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2 + with: + go-version: 1.16.x + - uses: actions/checkout@v2 + - name: Test + run: go test -cover ./... + + analyze: + name: CodeQL + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: github/codeql-action/init@v1 + with: + languages: go + - uses: github/codeql-action/analyze@v1