Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updates:
directory: "/"
insecure-external-code-execution: allow
schedule:
interval: "daily"
interval: "monthly"
open-pull-requests-limit: 100
labels:
- "maintenance"
Expand All @@ -18,7 +18,21 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "monthly"
open-pull-requests-limit: 100
labels:
- "maintenance"
- "dependencies"
groups:
actions:
patterns:
- "*"
commit-message:
prefix: "chore"
- package-ecosystem: "github-actions"
directory: "examples/pure-hatch/.github/workflows"
schedule:
interval: "weekly"
open-pull-requests-limit: 100
labels:
- "maintenance"
Expand Down
46 changes: 46 additions & 0 deletions examples/pure-hatch/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from our tutorial see #561

release:
types:
- published

permissions: {} # no permissions to the token at global level

jobs:
build_package:
name: Build the package
runs-on: ubuntu-latest
permissions:
contents: read # this job only needs read access
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up Hatch
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
- name: Build artifacts
run: hatch build
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: dist/
name: dist.zip
if-no-files-found: error
retention-days: 1

publish_release_to_pypi:
name: Publish release to PyPI
needs: [build_package]
runs-on: ubuntu-latest
environment:
name: pypi
url: <URL TO YOUR PROJECT HERE>
permissions:
contents: read # this job needs read access
id-token: write # but also needs to be able to write the publishing token
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: dist.zip
path: dist/
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
Loading