Skip to content

Commit

Permalink
pin versions of gha
Browse files Browse the repository at this point in the history
  • Loading branch information
captn3m0 committed Aug 6, 2024
1 parent 52eafce commit 2839e02
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- id: metadata
name: Dependabot metadata
uses: dependabot/fetch-metadata@v2.2.0
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
43 changes: 22 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
workflow_dispatch:


concurrency:
group: "pages-docs"
cancel-in-progress: false
Expand All @@ -15,33 +16,33 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5

- name: Install dependencies
run: python -m pip install .[docs]
- name: Install dependencies
run: python -m pip install .[docs]

- name: Build Docs
run: pdoc --html --output-dir docs src
- name: Build Docs
run: pdoc --html --output-dir docs src

- name: Converts README.md to HTML
uses: jaywcjlove/markdown-to-html-cli@main
with:
source: README.md
output: docs/index.html
github-corners: https://github.com/captn3m0/ecourts
- name: Converts README.md to HTML
uses: jaywcjlove/markdown-to-html-cli@395545594ec37e80b121bb838c2b49f93d16373a # main
with:
source: README.md
output: docs/index.html
github-corners: https://github.com/captn3m0/ecourts

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Setup Pages
id: pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: docs
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: docs
deploy:
permissions:
pages: write
Expand Down
110 changes: 51 additions & 59 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,95 +7,87 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5

- name: Install dependencies
run: python3 -m pip install .
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Install dependencies
run: python3 -m pip install .
- name: Install pypa/build
run: >-
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish/PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ecourts
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Download all the dists
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # release/v1
publish-to-testpypi:
name: Publish/TestPyPI
needs:
- build
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/ecourts

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish/TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Download
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: python-package-distributions
path: dist/
- name: Publish/TestPyPI
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # release/v1
with:
repository-url: https://test.pypi.org/legacy/
github-release:
name: Upload Signed release
needs:
- publish-to-pypi
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/') # only tags are signed
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes-from-tag
dist/**
- name: Download all the dists
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@61f6a500bbfdd9a2a339cf033e5421951fbc1cd2 # v2.1.1
with:
inputs: >-
./dist/*.tar.gz ./dist/*.whl
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/') # only tags are signed
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes-from-tag dist/**

0 comments on commit 2839e02

Please sign in to comment.