This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-asf-example.git


The following commit(s) were added to refs/heads/main by this push:
     new a42b744  Add a GitHub Actions workflow to release on tag
a42b744 is described below

commit a42b744c68eed36ff9e544e90374cb2ee859758e
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Aug 13 20:13:49 2025 +0100

    Add a GitHub Actions workflow to release on tag
---
 .../{build_dists.yaml => build-dists.yaml}         |   0
 .github/workflows/release-on-tag.yaml              | 110 +++++++++++++++++++++
 pyproject.toml                                     |   4 +-
 src/asf/example/__init__.py                        |   2 +-
 uv.lock                                            |   4 +-
 5 files changed, 115 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/build_dists.yaml 
b/.github/workflows/build-dists.yaml
similarity index 100%
rename from .github/workflows/build_dists.yaml
rename to .github/workflows/build-dists.yaml
diff --git a/.github/workflows/release-on-tag.yaml 
b/.github/workflows/release-on-tag.yaml
new file mode 100644
index 0000000..67b7cca
--- /dev/null
+++ b/.github/workflows/release-on-tag.yaml
@@ -0,0 +1,110 @@
+name: release-on-tag
+
+on:
+  push:
+    tags:
+      - '*'
+
+permissions: { contents: read }
+
+env:
+  PACKAGE_NAME: asf-example
+
+jobs:
+  linux:
+    name: ${{ matrix.name }}
+    runs-on: ${{ matrix.runs_on }}
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - { name: manylinux-amd64,   image: 
quay.io/pypa/manylinux_2_28_x86_64,  runs_on: ubuntu-22.04 }
+          - { name: manylinux-aarch64, image: 
quay.io/pypa/manylinux_2_28_aarch64, runs_on: ubuntu-22.04-arm }
+          - { name: musllinux-amd64,   image: 
quay.io/pypa/musllinux_1_2_x86_64,   runs_on: ubuntu-22.04 }
+          - { name: musllinux-aarch64, image: 
quay.io/pypa/musllinux_1_2_aarch64,  runs_on: ubuntu-22.04-arm }
+    steps:
+      - name: Checkout (shallow, no persisted creds)
+        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # 
v4.3.0
+        with:
+          fetch-depth: 1
+          persist-credentials: false
+
+      - name: Build dists with uv inside ${{ matrix.image }}
+        run: |
+          docker run --rm -v "$GITHUB_WORKSPACE:/work" -w /work \
+            ${{ matrix.image }} \
+            sh -lc 'python3 -m pip -q install -U pip uv && uv build --sdist 
--wheel'
+
+      - name: Upload dists artifact (${{ matrix.name }})
+        uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 
# v4
+        with:
+          name: ${{ matrix.name }}
+          path: dist/*
+
+  macos-aarch64:
+    runs-on: macos-14
+    strategy:
+        fail-fast: false
+    steps:
+      - name: Checkout (shallow, no persisted creds)
+        uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # 
v4.3.0
+        with:
+          fetch-depth: 1
+          persist-credentials: false
+      - name: Setup uv
+        uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # 
v6.4.3
+      - name: Build dists with uv (sdist+wheel)
+        run: uv build --sdist --wheel
+      - name: Upload dists artifact (macos-aarch64)
+        uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 
# v4
+        with:
+          name: macos-aarch64
+          path: dist/*
+
+  # Development releases
+  publish-testpypi:
+    needs: [linux, macos-aarch64]
+    runs-on: ubuntu-22.04
+    if: contains(github.ref_name, '-dev')
+    permissions:
+      contents: write
+      id-token: write
+    steps:
+      - name: Download all artifacts into dist/
+        uses: 
actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
+        with:
+          merge-multiple: true
+          path: dist
+      - name: Create GitHub prerelease for ${GITHUB_REF_NAME}
+        env:
+            GITHUB_TOKEN: ${{ github.token }}
+        run: gh release create "${GITHUB_REF_NAME}" dist/* --prerelease 
--notes "Dev release ${GITHUB_REF_NAME}"
+      - name: Publish to TestPyPI (Trusted Publisher)
+        uses: 
pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
+        with:
+          repository-url: https://test.pypi.org/legacy/
+          packages-dir: dist/
+          skip-existing: true
+
+  # Production releases
+  publish-pypi:
+    needs: [linux, macos-aarch64]
+    runs-on: ubuntu-22.04
+    if: ${{ !contains(github.ref_name, '-dev') }}
+    permissions:
+      contents: write
+      id-token: write
+    steps:
+      - name: Download all artifacts into dist/
+        uses: 
actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
+        with:
+          merge-multiple: true
+          path: dist
+      - name: Create GitHub Release for ${GITHUB_REF_NAME}
+        env:
+            GITHUB_TOKEN: ${{ github.token }}
+        run: gh release create "${GITHUB_REF_NAME}" dist/* --notes "Release 
${GITHUB_REF_NAME}"
+      - name: Publish to PyPI (Trusted Publisher)
+        uses: 
pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
+        with:
+          packages-dir: dist/
diff --git a/pyproject.toml b/pyproject.toml
index 6370b9b..96ce03c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
 [project]
 name            = "asf-example"
 # This is automatically updated
-version         = "0.0.1-dev2"
+version         = "0.0.1-dev3"
 description     = "Example package for ASF Tooling"
 readme          = "README.md"
 requires-python = ">=3.13"
@@ -48,4 +48,4 @@ select = [
 
 [tool.uv]
 # This is automatically updated
-exclude-newer = "2025-08-13T19:11:53Z"
+exclude-newer = "2025-08-13T19:13:17Z"
diff --git a/src/asf/example/__init__.py b/src/asf/example/__init__.py
index 3a032f0..4e805d6 100644
--- a/src/asf/example/__init__.py
+++ b/src/asf/example/__init__.py
@@ -37,7 +37,7 @@ import tomlkit.items
 
 PROJECT: Final[str] = "asf-example"
 # This is automatically updated
-VERSION: Final[str] = "0.0.1-dev2"
+VERSION: Final[str] = "0.0.1-dev3"
 
 
 class BumpMode(enum.Enum):
diff --git a/uv.lock b/uv.lock
index 4a23f25..db24098 100644
--- a/uv.lock
+++ b/uv.lock
@@ -3,11 +3,11 @@ revision = 3
 requires-python = ">=3.13"
 
 [options]
-exclude-newer = "2025-08-13T19:11:53Z"
+exclude-newer = "2025-08-13T19:13:17Z"
 
 [[package]]
 name = "asf-example"
-version = "0.0.1.dev2"
+version = "0.0.1.dev3"
 source = { editable = "." }
 dependencies = [
     { name = "pygit2" },


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to