bump golang to 1.23, golangci-lint to v2, fix errors #30
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: RTF CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.4 | |
id: go | |
- name: Set path | |
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
env: | |
GOPATH: ${{runner.workspace}} | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Get pre-requisites | |
run: | | |
make install-deps | |
env: | |
GOPATH: ${{runner.workspace}} | |
- name: Tests | |
run: | | |
make test | |
env: | |
GOPATH: ${{runner.workspace}} | |
build: | |
name: Build | |
needs: test | |
strategy: | |
matrix: | |
os: [linux,darwin,windows] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.23 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.4 | |
id: go | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: build | |
id: build | |
run: | | |
if grep -q "windows" <<< "${{matrix.os}}"; then | |
export TARGET="windows.exe" | |
else | |
export TARGET="${{matrix.os}}" | |
fi | |
echo "::set-output name=binary::rtf-$TARGET" | |
make clean | |
GOOS=${{matrix.os}} make | |
mv rtf "rtf-${TARGET}" | |
env: | |
GOPATH: ${{runner.workspace}} | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rtf-binaries | |
path: ${{steps.build.outputs.binary}} | |