diff --git a/.github/workflows/builds.yaml b/.github/workflows/builds.yaml index bcd7ab0..1c7f171 100644 --- a/.github/workflows/builds.yaml +++ b/.github/workflows/builds.yaml @@ -80,6 +80,9 @@ jobs: echo "Attempting build with: python -m build" python -m build fi - echo "Checking build artefacts with twine: dist/*" + + - name: "Validating Artefacts with Twine" + run: | + echo "Validating artefacts with: twine check dist/*" pip install --upgrade twine twine check dist/* diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 153ee64..c1f20c1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,8 +20,11 @@ env: ### BUILD ### jobs: + build: name: "🐍 Build packages" + # Only publish on tag pushes + if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest permissions: # IMPORTANT: mandatory for Sigstore @@ -97,6 +100,21 @@ jobs: dist/*.whl dist/*.sigstore + - name: "📦 Publish artefacts to GitHub" + # https://github.com/softprops/action-gh-release + uses: softprops/action-gh-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + tag_name: ${{ github.ref_name }} + name: "Test/Development Build \ + ${{ github.ref_name }}" + # body_path: ${{ github.workspace }}/CHANGELOG.rst + files: | + dist/*.tar.gz + dist/*.whl + dist/*.sigstore + ### PUBLISH PYPI TEST ### testpypi: diff --git a/.github/workflows/test-release.yaml b/.github/workflows/test-release.yaml index b9f8931..8acda21 100644 --- a/.github/workflows/test-release.yaml +++ b/.github/workflows/test-release.yaml @@ -103,16 +103,16 @@ jobs: echo "tarball=$(ls dist/*.tgz)" >> "$GITHUB_OUTPUT" echo "wheel=$(ls dist/*.whl)" >> "$GITHUB_OUTPUT" - - name: "📦 Publish packages to GitHub" - uses: ModeSevenIndustrialSolutions/action-automatic-releases@latest + - name: "📦 Publish artefacts to GitHub" + # https://github.com/softprops/action-gh-release + uses: softprops/action-gh-release@v2 with: - # Valid inputs are: - # repo_token, automatic_release_tag, draft, prerelease, title, files - repo_token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} prerelease: true - automatic_release_tag: ${{ steps.setenv.outputs.vernum }} - title: "Development Build \ + tag_name: ${{ steps.setenv.outputs.vernum }} + name: "Test/Development Build \ ${{ steps.setenv.outputs.vernum }}" + # body_path: ${{ github.workspace }}/CHANGELOG.rst files: | dist/*.tar.gz dist/*.whl diff --git a/.gitignore b/.gitignore index c4ad8e4..3a63141 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,14 @@ # Temporary devops repo .devops +# Twine temporary files +package-lock.json +package.json + # Output files from co2budget.ipynb (ITR-Examples) OECM-images TPI-images - # Local node cache node_modules