Skip to content

Commit

Permalink
add hg puglish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mixas committed Feb 17, 2024
1 parent 1ca51f3 commit 59ecdaf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yaml
@@ -0,0 +1,30 @@
---
name: Publish python package
on:
release:
types: [created]
jobs:
tests:
uses: ./.github/workflows/tests.yml
publish_on_pypi:
runs-on: ubuntu-latest
needs: [tests]
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
cache-dependency-path: '**/pyproject.toml'
- name: Install dependencies
run: |
pip install build
- name: Build
run: |
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
@@ -1,5 +1,5 @@
name: tests
on: ["push", "pull_request"]
on: ['push', 'pull_request', 'workflow_call']
jobs:
tests:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -31,8 +31,8 @@ jobs:
steps:
- uses: actions/checkout@v4

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

Expand Down

0 comments on commit 59ecdaf

Please sign in to comment.