Skip to content

Commit

Permalink
Merge pull request #56 from yutanagano/develop
Browse files Browse the repository at this point in the history
Update github workflows to work with new Node
  • Loading branch information
yutanagano authored Feb 8, 2024
2 parents edf4051 + 4e48514 commit 8999d10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 44 deletions.
48 changes: 6 additions & 42 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
name: publish to PyPI
on:
push:
branches:
- 'main'
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: check out branch
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: install build
run: python3 -m pip install build --user
- name: build wheel and source tarball
run: python3 -m build
- name: store distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
Expand All @@ -34,43 +32,9 @@ jobs:
id-token: write
steps:
- name: download dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
needs:
- publish
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: download dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: sign dists
uses: sigstore/gh-action-sigstore-python@v1.2.3
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: create release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: upload release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Check out branch
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_ver }}
- name: Install dependencies
Expand Down

0 comments on commit 8999d10

Please sign in to comment.