Skip to content

Commit e021793

Browse files
fholgerarmintaenzertng
authored andcommitted
Create new Github workflow to build a release when a tag is pushed
Signed-off-by: Holger Frydrych <holger.frydrych@tngtech.com>
1 parent 00c355d commit e021793

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/prepare_release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Prepare release
2+
3+
on:
4+
push:
5+
tags: [ 'v*.*.*']
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.7'
19+
- name: Set up dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install --upgrade setuptools wheel setuptools_scm build twine
23+
python -m pip install -e .
24+
shell: bash
25+
- name: Build wheel
26+
run: python -m build
27+
- name: Verify build
28+
run: twine check dist/*
29+
- name: Create build archive
30+
uses: a7ul/tar-action@v1.1.0
31+
with:
32+
command: c
33+
files: dist
34+
outPath: spdx_tools_dist.tar.gz
35+
- name: Create GitHub release
36+
uses: softprops/action-gh-release@v1
37+
with:
38+
files: spdx_tools_dist.tar.gz
39+
generate_release_notes: true
40+
draft: true

0 commit comments

Comments
 (0)