From 0779f1ff3fe0312c169956e6345dd020cdb89089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Sat, 1 Oct 2022 19:20:31 +0200 Subject: [PATCH] Refine CI --- .github/dependabot.yml | 5 +++++ .github/workflows/build.yml | 12 ++++++------ .github/workflows/release.yml | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index dd745c8..0932a60 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,6 +17,11 @@ updates: schedule: interval: "weekly" + - package-ecosystem: "docker" + directory: "/build" + schedule: + interval: "weekly" + # Maintain dependencies for GitHub Actions - package-ecosystem: "github-actions" directory: "/" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7adab3e..e373680 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,13 +11,13 @@ jobs: ci-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v3.0.2 + - uses: actions/setup-go@v3.3.0 with: go-version: 1.18 - run: ./goyek.sh - - name: Upload coverage - uses: actions/upload-artifact@v3 + - name: Upload HTML coverage + uses: actions/upload-artifact@v3.1.0 with: name: coverage path: coverage.* @@ -35,8 +35,8 @@ jobs: - '1.19' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v3.0.2 + - uses: actions/setup-go@v3.3.0 with: go-version: ${{ matrix.go-version }} - run: go test -race ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5b23bdd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: release + +on: + push: + tags: [ 'v*' ] + +jobs: + godoc: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3.3.0 + with: + go-version: '1.19' + - name: Wait 1 minute + # make sure that new the tag is available for pkg.go.dev + run: sleep 60 + - name: Update pkg.go.dev + run: go get -u github.com/${{ github.repository }}@${{ github.ref_name }}