update-ip/.gitea/workflows/release.yaml

30 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-07-24 15:44:36 +02:00
on: [push]
jobs:
build:
runs-on: ubuntu-latest
trategy:
matrix:
go-os: [ 'linux' ]
go-arch: [ 'amd64', 'arm64' ]
steps:
2024-07-24 15:57:13 +02:00
- name: Setup repository
uses: actions/checkout@v4
2024-07-24 15:49:59 +02:00
- name: Setup Go
2024-07-24 15:44:36 +02:00
uses: actions/setup-go@v5
with:
2024-07-24 15:49:59 +02:00
go-version: '1.22.x'
2024-07-24 15:44:36 +02:00
- name: Display Go version
2024-07-24 15:49:59 +02:00
run: go version
- name: Install dependencies for ${{ matrix.go-os }} ${{ matrix.go-arch }}
2024-07-24 15:44:36 +02:00
run: GOOS=${{ matrix.go-os }} GOARCH=${{ matrix.go-arch }} go get -v
2024-07-24 15:49:59 +02:00
- name: Test for ${{ matrix.go-os }} ${{ matrix.go-arch }}
2024-07-24 15:44:36 +02:00
run: GOOS=${{ matrix.go-os }} GOARCH=${{ matrix.go-arch }} go test -v ./...
2024-07-24 15:49:59 +02:00
- name: Build for ${{ matrix.go-os }} ${{ matrix.go-arch }}
2024-07-24 15:44:36 +02:00
run: GOOS=${{ matrix.go-os }} GOARCH=${{ matrix.go-arch }} go build -v ./cmd/update-ip
2024-07-24 15:49:59 +02:00
- name: Upload Go test results for ${{ matrix.go-os }} ${{ matrix.go-arch }}
2024-07-24 15:44:36 +02:00
uses: actions/upload-artifact@v4
with:
name: update-ip_${{ matrix.go-os }}_${{ matrix.go-arch }}
path: update-ip