Skip to content

Commit

Permalink
ci: Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Apr 4, 2024
1 parent b7707ee commit 5dce2b6
Showing 1 changed file with 24 additions and 32 deletions.
56 changes: 24 additions & 32 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ jobs:

sdist:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
Expand All @@ -24,9 +24,9 @@ jobs:
python setup.py sdist
ls -lh dist
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-src
path: dist


Expand All @@ -37,8 +37,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
pyver: [cp311-cp311]
os: [ubuntu-22.04]
pyver: [cp312-cp312]
arch: [x86_64, aarch64]

env:
Expand All @@ -47,13 +47,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -91,34 +91,26 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: dist
name: dist-${{ matrix.os }}-${{ matrix.pyver }}-${{ matrix.arch }}
path: dist


publish:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
needs: [sdist, bdist_wheel]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment:
name: deploy-to-pypi
url: https://pypi.org/p/backend.ai-krunner-alpine
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U twine
- name: Download distributions
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
pattern: dist-*
merge-multiple: true
path: dist
- name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
- name: >-
Publish 🐍📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 5dce2b6

Please sign in to comment.