aboutsummaryrefslogtreecommitdiffhomepage
path: root/.gitea/workflows/release.yml
blob: 625de0d381b244189cd8041faf613f86af09101d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: release

on:
  push:
    tags:
      - '*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Setup go
        uses: https://github.com/actions/setup-go@v5
        with:
          go-version: '>=1.23.0'

      - name: Get dependencies
        run: >-
          apt-get update &&
          apt-get install -y
          gcc
          pkg-config
          libacl1-dev
        if: ${{ runner.os == 'Linux' }}

      - name: Build for Linux
        run: >-
          go build -v -ldflags '-s -w
          -X git.ophivana.moe/security/fortify/internal.Version=${{ github.ref_name }}
          -X git.ophivana.moe/security/fortify/internal.Fsu=/usr/bin/fsu
          -X git.ophivana.moe/security/fortify/internal.Finit=/usr/libexec/fortify/finit
          -X main.Fmain=/usr/bin/fortify
          -X main.Fshim=/usr/libexec/fortify/fshim'
          -o bin/ ./... &&
          (cd bin && sha512sum --tag -b * > sha512sums)

      - name: Release
        id: use-go-action
        uses: https://gitea.com/actions/release-action@main
        with:
          files: |-
            bin/**
          api_key: '${{secrets.RELEASE_TOKEN}}'