-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (73 loc) · 2.4 KB
/
create-release.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Creating Release
run-name: ${{ github.actor }} is building action
on:
push:
branches:
- 'release/**'
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
outputs:
version_output: ${{ steps.version.outputs.project_version }}
upload_url_output: ${{ steps.release.outputs.upload_url }}
steps:
- name: Checkout branch
id: checkout
uses: actions/checkout@v2
- name: Project version
id: version
run: echo "project_version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Create release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
body_path: CHANGELOG
tag_name: icmpflood-${{ steps.version.outputs.project_version }}
release_name: icmpflood-${{ steps.version.outputs.project_version }}
linux-build:
name: Linux build
runs-on: ubuntu-latest
needs: create-release
permissions:
contents: write
strategy:
matrix:
python-version: [ "3.9" ]
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
id: python-setup
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pdoc3
- name: Pydoc generation
run: |
pdoc3 --force --html --output-dir docs icmpflood
- name: Create archive
id: archive
uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310
with:
files: .
dest: icmpflood-docs-${{ needs.create-release.outputs.version_output }}.zip
recursive: true
- name: Upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url_output }}
asset_name: icmpflood-docs-${{ needs.create-release.outputs.version_output }}.zip
asset_path: ./icmpflood-docs-${{ needs.create-release.outputs.version_output }}.zip
asset_content_type: application/zip