Skip to content

fix: Fix the format of the user-agent header (#23) #17

fix: Fix the format of the user-agent header (#23)

fix: Fix the format of the user-agent header (#23) #17

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- .editorconfig
- .gitignore
- CHANGELOG.md
- LICENSE.md
- README.md
jobs:
verify:
name: Verify
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check formatting
run: test -z "$(go fmt ./...)"
- name: Lint source code
uses: golangci/golangci-lint-action@v4
with:
version: latest
- name: Look for suspicious constructs
run: test -z "$(go vet ./...)"
- name: Run tests
run: go test -cover -v ./...
release:
name: Release?
needs: [ verify ]
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prepare a release
id: release
uses: google-github-actions/release-please-action@v4
with:
config-file: .github/release-config.json
manifest-file: .github/release-manifest.json
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update the version number
if: ${{ steps.release.outputs.prs_created == 'true' }}
run: |
git config pull.ff only
git checkout ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
git pull origin ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
version=$(jq -r '."."' .github/release-manifest.json)
version=${version#v}
sed -i '/const semanticVersion = \"[0-9]*\.[0-9]*\.[0-9]*\"/cconst semanticVersion = \"$version\"' version.go
git config --local user.name "David Letterman"
git config --local user.email "48985810+david-letterman@users.noreply.github.com"
git add version.go
git commit -m "chore: Configure the version number"
git push