Skip to content

Commit

Permalink
feat(ci): lint and publish
Browse files Browse the repository at this point in the history
Add new GitHub Action workflows to lint the REUSE requirements and
publish package on PyPI whenever a release is tagged.

Signed-off-by: Gaurav Mishra <[email protected]>
  • Loading branch information
GMishx committed Nov 2, 2023
1 parent 97e9af6 commit d36aa6e
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-FileCopyrightText: © 2023 Siemens AG
# SPDX-FileContributor: Gaurav Mishra <[email protected]>

# SPDX-License-Identifier: LGPL-2.1-only

name: Publish Release Packages

on:
release:
types:
- published

jobs:
pypi-publish:
runs-on: ubuntu-latest
# environment:
# name: pypi
# url: https://pypi.org/p/safaa
# permissions:
# id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: 'x64'
- name: Install wheel
run: python3 -m pip install --upgrade wheel
- name: Build packages
run: python3 setup.py sdist bdist_wheel
working-directory: ./Safaa
- name: Upload Packages to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/reuse-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: © 2023 Siemens AG
# SPDX-FileContributor: Gaurav Mishra <[email protected]>

# SPDX-License-Identifier: LGPL-2.1-only

name: Static lints

concurrency:
group: static-${{ github.head_ref }}
cancel-in-progress: true

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
REUSE-Compliance-Check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2

0 comments on commit d36aa6e

Please sign in to comment.