spec: separar responsabilidades feat: agregra pipeline de construccion en gitea
96 lines
2.8 KiB
YAML
96 lines
2.8 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
name: build-binaries
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: setup-go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26'
|
|
|
|
- name: build-linux-amd64
|
|
env:
|
|
GOOS: linux
|
|
GOARCH: amd64
|
|
CGO_ENABLED: '0'
|
|
LDFLAGS: -s -w -X main.Version=${{ github.ref_name }} -X main.GiteaURL=${{ github.server_url }} -X main.RepoOwner=${{ github.repository_owner }} -X main.RepoName=outline-mcp
|
|
run: |
|
|
mkdir -p dist
|
|
go build -buildvcs=false -ldflags "$LDFLAGS" -o dist/outline-mcp_${GOOS}_${GOARCH} .
|
|
|
|
- name: build-darwin-arm64
|
|
env:
|
|
GOOS: darwin
|
|
GOARCH: arm64
|
|
CGO_ENABLED: '0'
|
|
LDFLAGS: -s -w -X main.Version=${{ github.ref_name }} -X main.GiteaURL=${{ github.server_url }} -X main.RepoOwner=${{ github.repository_owner }} -X main.RepoName=outline-mcp
|
|
run: |
|
|
mkdir -p dist
|
|
go build -buildvcs=false -ldflags "$LDFLAGS" -o dist/outline-mcp_${GOOS}_${GOARCH} .
|
|
|
|
- name: build-windows-amd64
|
|
env:
|
|
GOOS: windows
|
|
GOARCH: amd64
|
|
CGO_ENABLED: '0'
|
|
LDFLAGS: -s -w -X main.Version=${{ github.ref_name }} -X main.GiteaURL=${{ github.server_url }} -X main.RepoOwner=${{ github.repository_owner }} -X main.RepoName=outline-mcp
|
|
run: |
|
|
mkdir -p dist
|
|
go build -buildvcs=false -ldflags "$LDFLAGS" -o dist/outline-mcp_${GOOS}_${GOARCH}.exe .
|
|
|
|
- name: list-artifacts
|
|
run: ls -la dist/
|
|
|
|
- name: upload-assets
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: binaries
|
|
path: dist/*
|
|
|
|
release:
|
|
name: publish-release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: download-binaries
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: binaries
|
|
path: dist
|
|
|
|
- name: list-downloads
|
|
run: ls -la dist/
|
|
|
|
- name: install-tea
|
|
run: |
|
|
curl -sL https://dl.gitea.com/tea/0.10.0/tea-0.10.0-linux-amd64 -o /usr/local/bin/tea
|
|
chmod +x /usr/local/bin/tea
|
|
tea --version
|
|
|
|
- name: publish-release
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
REPO_FULL: ${{ github.repository }}
|
|
run: |
|
|
tea release create \
|
|
--repo "${REPO_FULL}" \
|
|
--tag "${{ github.ref_name }}" \
|
|
--title "${{ github.ref_name }}" \
|
|
--note "Release ${{ github.ref_name }}" \
|
|
--asset dist/outline-mcp_linux_amd64 \
|
|
--asset dist/outline-mcp_darwin_arm64 \
|
|
--asset dist/outline-mcp_windows_amd64.exe
|