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
50 changes: 50 additions & 0 deletions .github/workflows/airbox-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Create Airbox Release
run-name: Create Airbox Release ${{ inputs.tag_name }} by @${{ github.actor }}

on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name (e.g., airbox-v0.1.0)'
required: true
type: string

permissions:
contents: write

jobs:
create-release:
name: Build and publish airbox release
runs-on: ubuntu-latest
steps:
- name: Validate tag
run: |
if [[ ! "${{ inputs.tag_name }}" =~ ^airbox-v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "tag is invalid: must be in the form 'airbox-v0.0.0'"
exit 1
fi
- name: Create tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ inputs.tag_name }}',
sha: context.sha
})
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Run GoReleaser for Airbox
uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
distribution: goreleaser
version: "~> v2"
args: release --config .goreleaser-airbox.yaml --clean
33 changes: 33 additions & 0 deletions .goreleaser-airbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json

version: 2

project_name: airbox

before:
hooks:
- go mod tidy

builds:
- main: ./cmd/airbox
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64

archives:
- format: tar.gz
name_template: '{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
wrap_in_directory: true
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

changelog:
disable: true
Loading