summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
blob: 6b1647a911a9f98fdf7040bea4e37d6103127be6 (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
name: Release

on:
  push:
    tags:
      - '*'

jobs:

  release:
    name: Release
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: '^1.18'

      # apt repos don't have YARA v4.2, install it from git
      - name: Install YARA
        run: |
          git clone --depth 1 https://github.com/virustotal/yara.git
          cd yara
          bash ./build.sh
          sudo make install
          cd ..

      - name: Build
        run: make

      - name: Create release
        uses: ncipollo/release-action@v1
        with:
          artifacts: "php-malware-finder"
          token: ${{ secrets.GITHUB_TOKEN }}
          allowUpdates: true
          omitBody:  true