-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (55 loc) · 1.78 KB
/
main.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches:
- main
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
permissions:
actions: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install necessary tools
run: |
apt update
apt install -y git subversion curl make gcc g++ autoconf file appstream libssl-dev
- name: Checkout
uses: actions/checkout@v4
- name: Patch repository permissions # Else the repository will be owned by another user and git will complain
run: chown -R root:root .
- name: Run build script
run: ./build.sh
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: nmap AppImage
path: |
*.AppImage
*.AppImage.zsync
- name: Get last github release version
id: last_version
uses: pozetroninc/[email protected]
with:
repository: ${{ github.repository }}
- name: Get nmap release version
run: echo "NMAP_VERSION=`cat NMAP_VERSION`" >> $GITHUB_ENV
- name: Print both versions
run: |
echo "Latest release is ${{ steps.last_version.outputs.release }}"
echo "Build version is ${{ env.NMAP_VERSION }}"
- name: Create release if new nmap version
if: "${{ env.NMAP_VERSION != steps.last_version.outputs.release }}"
uses: ncipollo/release-action@v1
with:
artifacts: "*.AppImage,*.AppImage.zsync"
tag: ${{env.NMAP_VERSION}}
- name: Create a dummy commit to keep the repository active
uses: gautamkrishnar/keepalive-workflow@v2