diff --git a/.github/versions/go b/.github/versions/go new file mode 100644 index 0000000..4ea8ad8 --- /dev/null +++ b/.github/versions/go @@ -0,0 +1 @@ +1.14.3 diff --git a/.github/workflows/go-bump.yml b/.github/workflows/go-bump.yml new file mode 100644 index 0000000..e6ee17e --- /dev/null +++ b/.github/workflows/go-bump.yml @@ -0,0 +1,29 @@ +name: Bump Go + +on: + schedule: + - cron: 00 7 * * * + + push: + branches: + - master + +jobs: + go-bump: + + runs-on: ubuntu-20.04 + + steps: + - name: Clone current repo + uses: actions/checkout@v2 + + - name: Bump Go + id: go-bump + uses: panchoh/go-bump@master + + - name: Create pull request + uses: peter-evans/create-pull-request@v2 + with: + title: ${{ steps.go-bump.outputs.pr-title }} + commit-message: ${{ steps.go-bump.outputs.pr-title }} + branch: ${{ steps.go-bump.outputs.branch-name }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7794600..ca1214a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,6 @@ on: tags: - v*.*.* -env: - GO_VERSION: 1.14.4 - jobs: build: @@ -18,6 +15,11 @@ jobs: with: fetch-depth: 0 + - name: Load Go version + id: go-version + run: | + echo "::set-env name=GO_VERSION::$(tr -d '\n' < .github/versions/go)" + - uses: actions/setup-go@v2 with: go-version: ${{ env.GO_VERSION }}