diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ea25d62e..edefe02a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,11 +14,12 @@ jobs: uses: actions/checkout@v2 - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: go-version: "1.14.5" - - uses: actions/cache@v1 + - name: Cache + uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -26,9 +27,7 @@ jobs: ${{ runner.os }}-go- - name: Install tools - run: | - ./setup.sh - echo "::add-path::$(go env GOPATH)/bin" + run: ./setup.sh - name: Check License Headers run: mage -v checkLicenseHeaders diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a274ea2e..1e66b0af 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,15 +16,40 @@ jobs: with: fetch-depth: 0 - - name: Tag - uses: tvdias/github-tagger@v0.0.2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: "1.14.5" + + - name: Cache + uses: actions/cache@v2 with: - repo-token: "${{ secrets.CI_TOKEN }}" - tag: "${{ github.event.inputs.version }}" + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install tools + run: ./setup.sh + + - name: Check License Headers + run: mage -v checkLicenseHeaders + + - name: Lint + run: mage -v lint - name: Test run: mage -v test + - name: Tag + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + tag='${{ github.event.inputs.version }}' + git tag --annotate --message "Tag for release $tag" "$tag" + git push origin "refs/tags/$tag" + - name: Release run: mage -v release env: