From 88154da2f4271af13d0a3a53eabeb4c48b7401ff Mon Sep 17 00:00:00 2001 From: Ryan May Date: Fri, 1 Nov 2024 15:34:23 -0600 Subject: [PATCH] MNT: Update release workflow Copies over from MetPy. Main change is to use the python build tool rather than setup.py. Also bumps versions of other actions being used. --- .github/workflows/release.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33e963b3d..9266cee94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,32 +6,28 @@ on: - published jobs: - packages: - name: Release Packages + build: + name: Build Release Packages runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 150 - - - name: Get tags - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + id: setup + uses: actions/setup-python@v5 with: python-version: 3.x - name: Install build tools run: | python -m pip install --upgrade pip - python -m pip install --upgrade setuptools setuptools_scm wheel + python -m pip install --upgrade build setuptools setuptools_scm wheel - name: Build packages - run: python setup.py sdist bdist_wheel + run: python -m build - name: Save built packages as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: packages-${{ runner.os }}-${{ steps.setup.outputs.python-version }} path: dist/ @@ -43,13 +39,13 @@ jobs: needs: build environment: name: PyPI - url: https://pypi.org/project/MetPy/ + url: https://pypi.org/project/siphon/ permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing runs-on: ubuntu-latest steps: - name: Download packages - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Consolidate packages for upload run: |