Skip to content

feat: support optional custom User Agent per-channel (#20, PR: #21) #9

feat: support optional custom User Agent per-channel (#20, PR: #21)

feat: support optional custom User Agent per-channel (#20, PR: #21) #9

Workflow file for this run

name: Go
on:
push:
tags:
- "v*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Golang
uses: actions/setup-go@v4
with:
go-version: 1.21
id: go
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Extract repository name
shell: bash
run: echo "##[set-output name=repo;]$(echo ${GITHUB_REPOSITORY##*/})"
id: extract_repo
- name: Get dependencies
run: |
go mod download
- name: Build
run: |
GOOS=linux GOARCH=amd64 go build -v -o ${GITHUB_REPOSITORY##*/}-linux-x64 ./cmd/...
GOOS=linux GOARCH=arm GOARM=5 go build -v -o ${GITHUB_REPOSITORY##*/}-linux-armv5 ./cmd/...
GOOS=linux GOARCH=arm64 go build -v -o ${GITHUB_REPOSITORY##*/}-linux-arm64 ./cmd/...
GOOS=darwin GOARCH=amd64 go build -v -o ${GITHUB_REPOSITORY##*/}-darwin-amd64 ./cmd/...
GOOS=darwin GOARCH=arm64 go build -v -o ${GITHUB_REPOSITORY##*/}-darwin-arm64 ./cmd/...
GOOS=windows GOARCH=amd64 go build -v -o ${GITHUB_REPOSITORY##*/}-windows-amd64.exe ./cmd/...
GOOS=windows GOARCH=386 go build -v -o ${GITHUB_REPOSITORY##*/}-windows-i386.exe ./cmd/...
GOOS=windows GOARCH=arm go build -v -o ${GITHUB_REPOSITORY##*/}-windows-arm.exe ./cmd/...
GOOS=windows GOARCH=arm64 go build -v -o ${GITHUB_REPOSITORY##*/}-windows-arm64.exe ./cmd/...
- name: Generate changelog
run: |
npm install -g conventional-changelog-cli
conventional-changelog -p angular -i CHANGELOG.md -s -r 2 -v
- uses: ncipollo/release-action@v1
with:
artifacts: ${{ steps.extract_repo.outputs.repo }}-*
bodyFile: "CHANGELOG.md"
token: ${{ secrets.GITHUB_TOKEN }}