Skip to content
Closed
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
4 changes: 0 additions & 4 deletions .cirrus.star

This file was deleted.

68 changes: 0 additions & 68 deletions .cirrus.yml

This file was deleted.

131 changes: 128 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
name: Main
name: CI

on:
pull_request:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:

permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
- name: Lint
run: golangci-lint run

test:
name: Test (Linux)
runs-on: ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-md
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: stable
Expand All @@ -22,3 +46,104 @@ jobs:
vetu pull ghcr.io/cirruslabs/ubuntu-runner-amd64:latest
- name: Run tests
run: go test -v -count=1 ./...

release_binaries_dry_run:
name: Release Binaries (Dry Run)
if: github.event_name != 'pull_request' && github.ref_type != 'tag'
needs:
- lint
- test
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Install GoReleaser
run: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
sudo apt update
sudo apt -y install goreleaser-pro
- name: Build snapshot
run: goreleaser release --skip=publish --snapshot --clean --verbose
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: orchard-binaries-dry-run
path: dist/orchard_*/orchard*
if-no-files-found: ignore

release_binaries:
name: Release Binaries
if: github.ref_type == 'tag'
needs:
- lint
- test
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: write
env:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Install GoReleaser
run: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
sudo apt update
sudo apt -y install goreleaser-pro
- name: Release
run: goreleaser

release_docker_image:
name: Release Docker Image
if: github.ref_type == 'tag'
needs:
- lint
- test
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
- name: Log in to GHCR
run: echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Configure buildx
run: |
docker buildx create --name multibuilder
docker buildx use multibuilder
docker buildx inspect --bootstrap
- name: Build and push image
run: |
docker buildx build --push --platform linux/amd64,linux/arm64 \
--tag "ghcr.io/cirruslabs/orchard:${GITHUB_REF_NAME}" \
--tag ghcr.io/cirruslabs/orchard:latest \
.
Loading