2024-07-15 23:47:08 +09:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Set up go
|
|
|
|
uses: https://github.com/actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: '>=1.20.1'
|
|
|
|
- name: Get dependencies
|
|
|
|
run: >-
|
|
|
|
sudo apt-get update &&
|
|
|
|
sudo apt-get install -y
|
|
|
|
gcc
|
|
|
|
pkg-config
|
|
|
|
libacl1-dev
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
|
|
|
- name: Build for Linux
|
|
|
|
run: >-
|
2024-09-04 01:27:04 +09:00
|
|
|
sh -c "go build -v -ldflags '-s -w -X main.Version=${{ github.ref_name }}' -o bin/fortify &&
|
|
|
|
sha256sum --tag -b bin/fortify > bin/fortify.sha256"
|
2024-07-15 23:47:08 +09:00
|
|
|
- name: Release
|
|
|
|
id: use-go-action
|
|
|
|
uses: https://gitea.com/actions/release-action@main
|
|
|
|
with:
|
|
|
|
files: |-
|
|
|
|
bin/**
|
|
|
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|