ci: update pipelines
Some checks failed
Go CI Pipeline / ci (push) Failing after 52s

This commit is contained in:
Patryk Hegenberg 2025-06-04 13:31:10 +02:00
parent 434d1f07d9
commit d395d76d04
3 changed files with 80 additions and 21 deletions

View file

@ -1,21 +0,0 @@
name: Build workctl
on: [push, pull_request]
jobs:
build-and-run:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Build Go application
run: |
go mod tidy
go build -o workctl .

30
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,30 @@
name: Go CI Pipeline
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Get dependencies
run: go mod tidy
- name: Lint code
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run
- name: Run tests
run: go test -v ./...
- name: Build application
run: go build -o workctl .

View file

@ -0,0 +1,50 @@
name: Release Builds
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
goos: [linux, darwin, windows]
exclude:
- os: ubuntu-latest
goos: darwin
- os: ubuntu-latest
goos: windows
- os: macos-latest
goos: linux
- os: macos-latest
goos: windows
- os: windows-latest
goos: linux
- os: windows-latest
goos: darwin
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Get dependencies
run: go mod tidy
- name: Build for ${{ matrix.goos }}
run: |
GOOS=${{ matrix.goos }} GOARCH=amd64 go build -o workctl-${{ matrix.goos }} .
ls -la
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: workctl-${{ matrix.goos }}
path: workctl-${{ matrix.goos }}