Skip to content

Commit

Permalink
action test
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Aug 25, 2024
1 parent f882c11 commit e369ce6
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: Publish Package

on:
release:
types: [created]
# release:
# types: [created]
push:
branches: [main]

jobs:
publish:
runs-on: ubuntu-latest
name: "Publish library"
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.12"]

steps:
- name: Check out
Expand All @@ -19,20 +21,24 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0

- name: Install rye
uses: phi-friday/install-rye@v2
id: install-rye
- name: Install python
uses: actions/setup-python@v4
id: install-python
with:
python_version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: yezz123/setup-uv@v4
id: install-uv

- name: Build package
run: |
rye install dunamai
uv tool install dunamai
VERSION=$(dunamai from any --no-metadata --style pep440).$(date +"%Y%m%d")
rye version $VERSION
rye build
uvx --with pdm-bump pdm bump to $VERSION
uvx --from build pyproject-build --installer uv
- name: Release to PyPI
run: |
rye publish --yes \
--username __token__ --token ${{ secrets.PYPI_API_TOKEN }}
# - name: Release to PyPI
# run: |
# uvx twine upload dist/* --non-interactive \
# --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit e369ce6

Please sign in to comment.