You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/03/02 11:46:28 UTC
(tooling-trusted-releases) 01/02: #344 - starter for instructions on how to upload via GitHub Actions. Needs committee filtering.
This is an automated email from the ASF dual-hosted git repository.
arm pushed a commit to branch promote_gha
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit a90dbf86ff3f0cbe89e8e136460bb9b423f71133
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Tue Feb 3 14:49:31 2026 +0000
#344 - starter for instructions on how to upload via GitHub Actions. Needs committee filtering.
---
atr/get/upload.py | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
atr/htm.py | 1 +
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/atr/get/upload.py b/atr/get/upload.py
index c4b36454..9d3297e3 100644
--- a/atr/get/upload.py
+++ b/atr/get/upload.py
@@ -70,7 +70,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"]
@@ -152,6 +153,50 @@ async def selected(
_render_ssh_keys_info(block, user_ssh_keys)
+ block.h2(id="github-upload")["GitHub Workflow"]
+ block.p["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}
+ version: ${{ github.ref_name }}
+ """
+ ]
+ block.p[
+ "(assuming your ", htm.code["github.ref_name"], f" resolves to match your version - currently {version_name})"
+ ]
+ 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:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org