Skip to content

Commit 2bf0727

Browse files
committed
add tag
1 parent 4ae5847 commit 2bf0727

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎.github/workflows/tagged-release.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Publish Tagged Android Release
33
on:
44
push:
55
tags: ['v*']
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: Existing immutable release tag to publish
10+
required: true
11+
type: string
612
workflow_call:
713
inputs:
814
tag:
@@ -22,9 +28,8 @@ jobs:
2228
env:
2329
INPUT_TAG: ${{ inputs.tag }}
2430
REF_TAG: ${{ github.ref_name }}
25-
EVENT_NAME: ${{ github.event_name }}
2631
run: |
27-
if [ "$EVENT_NAME" = "workflow_call" ]; then TAG="$INPUT_TAG"; else TAG="$REF_TAG"; fi
32+
if [ -n "$INPUT_TAG" ]; then TAG="$INPUT_TAG"; else TAG="$REF_TAG"; fi
2833
case "$TAG" in v[0-9]*.[0-9]*.[0-9]*) ;; *) exit 2 ;; esac
2934
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
3035
- uses: actions/checkout@v6

‎scripts/test_release_workflows.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ def test_tagged_publication_orders_github_before_play(self):
3232
github = workflow.index('gh release create')
3333
play = workflow.index('fastlane android upload_release')
3434
self.assertLess(github, play)
35+
self.assertIn("workflow_dispatch:", workflow)
36+
self.assertIn('if [ -n "$INPUT_TAG" ]', workflow)
37+
self.assertNotIn('EVENT_NAME: ${{ github.event_name }}', workflow)
3538
self.assertIn("sha256sum --check SHA256SUMS", workflow)
3639
self.assertIn("environment: release", workflow)
3740

0 commit comments

Comments
 (0)