typos #125
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: Go | |
| on: | |
| workflow_dispatch: | |
| pull_request_target: | |
| branches: [main, develop] | |
| push: | |
| branches: [main, develop, feature/*] | |
| paths-ignore: | |
| - README.md | |
| - .github/workflows/go.yml | |
| - .gitignore | |
| tags: | |
| - "*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.21 | |
| - name: Install dependencies | |
| continue-on-error: true | |
| run: | | |
| go get -u | |
| - name: Snapshot | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| args: --snapshot --clean | |
| version: latest | |
| distribution: goreleaser | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| UNSPLASH_CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
| UNSPLASH_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
| POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
| LOG_FORMAT: json | |
| LOG_LEVEL: trace | |
| ENABLE_SENTRY_DEBUG: false | |
| DEBUG: true | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Snapshot | |
| path: dist | |
| - name: Install SVU | |
| run: | | |
| echo 'deb [trusted=yes] https://apt.fury.io/caarlos0/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list | |
| sudo apt update && sudo apt install svu | |
| - name: Create Tag | |
| if: endsWith(github.ref, 'main') | |
| run: | | |
| git tag $(svu next --strip-prefix) | |
| git push --tags | |
| - name: Create Preview Tag | |
| if: endsWith(github.ref, 'develop') | |
| run: | | |
| git_hash=$(git rev-parse --short "$GITHUB_SHA") | |
| git_branch=${GITHUB_REF#refs/heads/} | |
| git tag $(svu prerelease --pre-release $git_branch --build $git_hash) | |
| git push --tags | |
| release: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.21 | |
| - name: Release | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: latest | |
| distribution: goreleaser | |
| args: release --clean | |
| env: | |
| DEBUG: false | |
| ENABLE_SENTRY_DEBUG: false | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
| UNSPLASH_CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
| UNSPLASH_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
| POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} |