ci: migrate pipeline from GitLab CI to Gitea Actions #1
@@ -0,0 +1,88 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
APP_NAME: greq
|
||||
GO_VERSION: "1.26.1"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build binaries
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
arch: amd64
|
||||
suffix: ""
|
||||
- os: linux
|
||||
arch: arm64
|
||||
suffix: ""
|
||||
- os: darwin
|
||||
arch: amd64
|
||||
suffix: ""
|
||||
- os: darwin
|
||||
arch: arm64
|
||||
suffix: ""
|
||||
- os: windows
|
||||
arch: amd64
|
||||
suffix: ".exe"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p dist
|
||||
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build \
|
||||
-ldflags="-s -w -X main.version=${{ github.ref_name }}" \
|
||||
-o dist/${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.suffix }} .
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: binaries-${{ matrix.os }}-${{ matrix.arch }}
|
||||
path: dist/*
|
||||
retention-days: 1
|
||||
|
||||
release:
|
||||
name: Create Gitea Release
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Create Release
|
||||
uses: https://github.com/actions/softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/*
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: "greq ${{ github.ref_name }}"
|
||||
body: |
|
||||
## greq ${{ github.ref_name }}
|
||||
|
||||
A terminal-based HTTP client with a TUI interface.
|
||||
|
||||
### Download
|
||||
A binárisok az alábbi mellékletekből tölthetőek le közvetlenül.
|
||||
draft: false
|
||||
prerelease: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user