diff --git a/.github/workflows/bumpr.yml b/.github/workflows/bumpr.yml new file mode 100644 index 0000000..a38318d --- /dev/null +++ b/.github/workflows/bumpr.yml @@ -0,0 +1,19 @@ +name: bumpr +on: + push: + branches: + - main +jobs: + bumpr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.BUMPER_APP_ID }} + private_key: ${{ secrets.BUMPER_APP_PRIVATE_KEY }} + id: generate-token + - uses: haya14busa/action-bumpr@v1 + with: + github_token: ${{ steps.generate-token.outputs.token }} + default_bump_level: patch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33487d1..8499162 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,29 +1,29 @@ name: release on: - push: - tags: - - "*" + push: + tags: + - "*" jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v4 with: - go-version: 1.19.x - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + go-version: 1.21.x + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v1 with: registry: ghcr.io username: airfocusio password: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d914549..93803ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: test on: push: branches: - - "*" + - main pull_request: branches: - main @@ -12,8 +12,11 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v4 with: - go-version: 1.19.x - - uses: actions/checkout@v2 - - run: make test + go-version: 1.21.x + - uses: actions/checkout@v4 + - name: Build sources + run: go build ./... + - name: Run tests + run: go test ./... -v diff --git a/Makefile b/Makefile index 3d1478e..b20ff17 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ test-cover: go tool cover -html=coverage.out build: - goreleaser release --rm-dist --skip-publish --snapshot + goreleaser release --clean --skip=publish --snapshot release: - goreleaser release --rm-dist + goreleaser release --clean diff --git a/go.mod b/go.mod index d436bea..7eef529 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/airfocusio/go-template -go 1.19 +go 1.21 require ( github.com/Masterminds/sprig v2.22.0+incompatible