chore(deps): update actions/upload-artifact action to v6 #128
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - 'main' | |
| - 'master' | |
| pull_request: | |
| env: | |
| # renovate: datasource=github-releases depName=golangci/golangci-lint versioning=semver-coerced | |
| GOLANGCI_LINT_VERSION: "v2.7.2" | |
| # renovate: datasource=github-releases depName=goreleaser/goreleaser versioning=semver-coerced | |
| GORELEASER_VERSION: "v2.13.1" | |
| # renovate: datasource=github-releases depName=ko-build/ko versioning=semver-coerced | |
| KO_VERSION: "v0.18.0" | |
| jobs: | |
| go: | |
| name: Go | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 | |
| with: | |
| version: ${{ env.GOLANGCI_LINT_VERSION }} | |
| - name: Run tests | |
| run: go test -v ./... | |
| - name: Build (Snapshot) | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6 | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| version: ${{ env.GORELEASER_VERSION }} | |
| args: --clean --skip=ko,publish --snapshot | |
| - name: Upload Artifacts (Snapshot) | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: dist | |
| path: dist/* | |
| - name: Set up ko | |
| uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| version: ${{ env.KO_VERSION }} | |
| - name: Release | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| version: ${{ env.GORELEASER_VERSION }} | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |