try defining GetBody #593
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: ['*'] | |
tags: ['v*'] | |
pull_request: | |
branches: ['*'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.18.x | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Load cached dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install | |
run: make install | |
- name: Test | |
run: make test_ci | |
- name: Upload coverage to codecov.io | |
uses: codecov/codecov-action@v1 | |
release: | |
runs-on: ubuntu-latest | |
# Only release pushes of tags starting with v and if the build succeeded. | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
needs: [build] | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.18.x | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Load cached dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install | |
run: make install | |
- name: Release | |
env: | |
GITHUB_REPO: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./scripts/release.sh ${{ github.ref }} | |