From adedd870b06c516c9a48a99082fa122b05610219 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Tue, 7 May 2024 11:45:15 -0500 Subject: [PATCH] Update release action (#1803) * make permissions local to release job (safer) * use correct artifact name, and unzip * Fix download and extract package --------- Co-authored-by: Tania Allard --- .github/workflows/publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18da61791..ff973840e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,6 @@ env: permissions: contents: read - id-token: write # needed for PyPI upload jobs: # calls our tests workflow @@ -46,13 +45,19 @@ jobs: release-pypi: runs-on: ubuntu-latest needs: [build-package] + permissions: + id-token: write # needed for PyPI upload steps: - name: "Download PST built package 📦" uses: actions/download-artifact@v4 with: - name: PST-package + name: Packages path: dist + - name: "Unzip artifact" + run: | + tar xf dist/*.tar.gz --strip-components=1 + - name: "Publish PST package to PyPI 🚀" uses: pypa/gh-action-pypi-publish@release/v1 # only publish if this is a published release by pydata