Repository navigation
78 lines (65 loc) · 2.04 KB
/
Copy pathrelease.yml
File metadata and controls
78 lines (65 loc) · 2.04 KB
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
name: Release on GitHub
## Run only when we push a tag.
on:
push:
tags:
- "v*"
jobs:
build-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v5
with:
java-version: 17
distribution: corretto
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
# Don't run any test, as build should had already been verified (and it takes hours...)
run: mvn clean verify -DskipTests
- name: Release
uses: softprops/action-gh-release@v1
with:
body: "See release notes at [release_notes.md](https://github.com/WebFuzzing/Commons/blob/master/release_notes.md)."
prerelease: false
draft: false
fail_on_unmatched_files: true
files: |
src/main/resources/wfc/schemas/report.yaml
src/main/resources/wfc/schemas/auth.yaml
src/main/resources/wfc/faults/fault_categories.json
publish-python:
needs: build-base
name: Build Python Distribution and Publish on PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install 'build'
shell: bash
run: |
pip install build
- name: Build Python Wheel
shell: bash
working-directory: ./pypi-distribution
run: |
rm -fr dist
python -m build
- uses: actions/upload-artifact@v7
with:
path: ./pypi-distribution/dist/*.whl
retention-days: ${{env.retention-days}}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./pypi-distribution/dist
password: ${{ secrets.PYPI_API_TOKEN }}