Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Feb 4, 2024
1 parent 219d487 commit 3bdd980
Showing 1 changed file with 43 additions and 45 deletions.
88 changes: 43 additions & 45 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@

name: Create Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '[0-9]+.[0-9]+.[0-9]+' # Exclude pre-releases
- '*'

name: Create Release

jobs:
build:
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: lvmpwi ${{ github.ref }}
body: ""
draft: false
prerelease: false

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
# python -m pip install --upgrade pip toml setuptools wheel twine
python -m pip install --upgrade pip toml setuptools wheel twine build
- name: Build package
run: |
# python setup.py sdist
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
build:
name: Build wheels
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.12']

permissions:
contents: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create release
uses: softprops/action-gh-release@v1
with:
name: lvmpwi ${{ github.ref_name }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build wheels
run: |
pyproject-build -w
- name: Build source
run: |
pyproject-build -s
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 3bdd980

Please sign in to comment.