Skip to content

Commit

Permalink
release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed May 30, 2024
1 parent b57a8f2 commit 0121e1f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
release:
types: [published] # releases and pre-releases (release candidates)

jobs:
publish-pypi:
runs-on: ubuntu-latest

# https://docs.pypi.org/trusted-publishers/using-a-publisher/
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release

steps:
- uses: actions/checkout@v4

- name: Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Build
run: python -m build

- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 1 addition & 4 deletions .github/workflows/main.yaml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: unitary

on:
pull_request:
push: # all
push:

jobs:
unitary:
Expand Down

0 comments on commit 0121e1f

Please sign in to comment.