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-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new f4b7ca05 #344 - instructions on how to upload via GitHub Actions
f4b7ca05 is described below

commit f4b7ca051eb7d6926b1dc5cc37cfcbdfd26ec7e6
Author: Alastair McFarlane <[email protected]>
AuthorDate: Mon Mar 2 20:26:40 2026 +0000

    #344 - instructions on how to upload via GitHub Actions
---
 atr/get/upload.py      | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-
 atr/htm.py             |  1 +
 atr/static/css/atr.css | 12 +++++++++--
 3 files changed, 66 insertions(+), 3 deletions(-)

diff --git a/atr/get/upload.py b/atr/get/upload.py
index ef2e6777..c5fab974 100644
--- a/atr/get/upload.py
+++ b/atr/get/upload.py
@@ -71,7 +71,8 @@ async def selected(
     block.p[
         htm.a(".btn.btn-outline-primary.me-2", href="#file-upload")["Use the 
browser"],
         htm.a(".btn.btn-outline-primary.me-2", href="#svn-upload")["Use SVN"],
-        htm.a(".btn.btn-outline-primary", href="#rsync-upload")["Use rsync"],
+        htm.a(".btn.btn-outline-primary.me-2", href="#rsync-upload")["Use 
rsync"],
+        htm.a(".btn.btn-outline-primary", href="#github-upload")["Use GitHub 
Workflow"],
     ]
 
     block.h2(id="file-upload")["File upload"]
@@ -153,6 +154,59 @@ async def selected(
 
     _render_ssh_keys_info(block, user_ssh_keys)
 
+    block.h2(id="github-upload")["GitHub Workflow"]
+    block.p[
+        "If your project is approved for reproducible builds, you can ",
+        "upload files into this draft from a GitHub repository using GitHub 
Actions.",
+    ]
+    block.append(
+        htm.ol[
+            htm.li["Ensure GitHub Actions is enabled for your repository"],
+            htm.li[
+                "Create a new workflow file in the .github/workflows/ 
directory of your repository, ",
+                "following the steps ",
+                
htm.a(href="https://docs.github.com/en/actions/tutorials/create-an-example-workflow";)["here"],
+            ],
+            htm.li["Add the example code below to your workflow file, making 
sure to set the correct file paths"],
+        ]
+    )
+    block.pre[
+        f"""
+name: Upload to ATR
+on:
+  workflow_dispatch:
+
+jobs:
+  upload:
+    permissions:
+      id-token: write
+      contents: read
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
+
+      - name: Build artifacts
+        run: |
+          ./build.sh
+
+      - name: Upload to ATR
+        uses: 
apache/tooling-actions/upload-to-atr@04741906f3f38a64ed4489bb12ad78b99424a7a0
+        with:
+          project: {project_name!s}
+          version: ${{{{github.ref_name}}}}
+        """
+    ]
+    block.p[
+        "(assuming your",
+        htm.code[" github.ref_name "],
+        "resolves to match your version - currently",
+        htm.code[f" {version_name!s} "],
+        "and",
+        htm.code[" build.sh "],
+        " produces the files you want to upload)",
+    ]
+    block.p["You can also use the", htm.code[" Upload to ATR "], "step 
directly in an existing workflow."]
+
     return await template.blank(
         f"Upload files to {release.short_display_name}",
         content=block.collect(),
diff --git a/atr/htm.py b/atr/htm.py
index c0d925c5..f8355cd3 100644
--- a/atr/htm.py
+++ b/atr/htm.py
@@ -61,6 +61,7 @@ thead = htpy.thead
 title = htpy.title
 tr = htpy.tr
 ul = htpy.ul
+ol = htpy.ol
 
 
 class BlockElementGetable:
diff --git a/atr/static/css/atr.css b/atr/static/css/atr.css
index 0949be3f..bc8af074 100644
--- a/atr/static/css/atr.css
+++ b/atr/static/css/atr.css
@@ -191,10 +191,14 @@ table {
     border-collapse: collapse;
 }
 
-ul, ol {
+ul {
     padding-left: 1rem;
 }
 
+ol {
+    padding-left: 2rem;
+}
+
 input, option, select, textarea {
     font-size: 17px !important;
     font-weight: 425 !important;
@@ -251,7 +255,7 @@ h1, h2, h3 {
     font-family: "Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe 
UI", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", sans-serif;
 }
 
-h3, p, ul, form {
+h3, p, ul, ol, form {
     margin-bottom: 1rem;
 }
 
@@ -259,6 +263,10 @@ li ul {
     margin-bottom: 0;
 }
 
+li ol {
+    margin-bottom: 0;
+}
+
 table th {
     text-align: left;
 }


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

Reply via email to