diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ce5e074 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Master-Build +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: '1.17' + - name: Test + run: make test-all + + - name: Git Version + id: tag_version + uses: codacy/git-version@2.2.0 + with: + prefix: v + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag_version.outputs.version }} + release_name: Release ${{ steps.tag_version.outputs.version }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index 5d06aec..0000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Master-Build -on: - push: - branches: - - "master" - pull_request: - branches: - - "master" -jobs: - main-build: - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v1 - - name: Set up Go - uses: actions/setup-go@v1 - with: - go-version: 1.13.5 - - name: Test - run: make test-all - env: - GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 525201d..ccb2d7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v1 with: - go-version: 1.13.5 + go-version: '1.17' - name: goreleaser uses: goreleaser/goreleaser-action@v1 with: