diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..b8f6932 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,23 @@ +name: Go Check +on: [push, pull_request] +jobs: + check: + runs-on: ubuntu-latest + strategy: + matrix: + go: [1.20.x, 1.21.x, 1.22.x] + steps: + - name: Setup Go environment + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + stable: true + + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Get dependencies + run: go get -v -t -d ./... + + - name: Test + run: go test ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..87bd4a6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + workflow_run: + workflows: ["Go Check"] + types: + - completed + branches: + - master + +jobs: + release: + + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Go environment + uses: actions/setup-go@v5 + with: + go-version: 1.22.x + stable: true + + - name: Get dependencies + run: go get -v -t -d ./... + + - name: Build + run: | + TAG=$(git describe --tags --abbrev=0) + GIT_TAG=$TAG make clean build + + - name: Create release + if: startsWith(github.ref, 'refs/tags/v') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + files: build/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true + name: Release ${{ github.ref }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3fb6479..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: go -go: -- "1.18.x" - -notifications: - email: false - -script: -- go test ./... - -before_deploy: -- GIT_TAG=$TRAVIS_TAG make clean build - -deploy: -- provider: releases - api_key: $GH_TOKEN - file_glob: true - file: build/* - skip_cleanup: true - on: - tags: true diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..47e79ba --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @gotify/committers