Skip to content

Create new Github workflow to build a release when a tag is pushed #702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/check_codestyle.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0

name: Run Linter

on:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/install_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0

name: Install and Test

on:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0

name: Prepare release

on:
push:
tags: [ 'v*.*.*']

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel setuptools_scm build twine
python -m pip install -e .
shell: bash
- name: Build wheel
run: python -m build
- name: Verify build
run: twine check dist/*
- name: Create build archive
uses: a7ul/tar-action@v1.1.0
with:
command: c
files: dist
outPath: spdx_tools_dist.tar.gz
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: spdx_tools_dist.tar.gz
generate_release_notes: true
draft: true