-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (43 loc) · 1.16 KB
/
gh-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
name: GitHub Release
on:
workflow_call:
inputs:
files:
required: false
type: string
outputs:
semvertag:
description: "The semantic versioning tag name created"
value: ${{ jobs.release.outputs.semvertag }}
jobs:
release:
runs-on: ubuntu-latest
outputs:
semvertag: ${{ steps.getver.outputs.semvertag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Build
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Build
run: |
python -m build
sphinx-build -b html docsrc/source build/docs
- name: Read version file
id: getver
run: |
VER=$(cat VERSION)
echo "VERSION=v$VER" >> $GITHUB_ENV
echo "semvertag=v$VER" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
tag_name: ${{ env.VERSION }}
files: ${{ inputs.files }}