Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .github/workflows/ci.yml
name: CI

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./cli

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- run: go mod tidy
- run: go build -v ./...
- run: go test ./...
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# .github/workflows/release.yml
name: Release

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]

defaults:
run:
working-directory: ./cli

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"

- run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \
go build -o ../archmaint-${{ matrix.goos }}-${{ matrix.goarch }}

- uses: actions/upload-artifact@v4
with:
name: archmaint-${{ matrix.goos }}-${{ matrix.goarch }}
path: ../archmaint-${{ matrix.goos }}-${{ matrix.goarch }}

release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: ./artifacts

- uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading