Skip to content

Commit 4dd88f7

Browse files
reid-spencerclaude
andcommitted
Change release workflow to trigger on release creation
Replaced tag-push trigger with on: release: types: [created] to match the riddl project pattern. Added workflow_dispatch for manual triggering with a tag input. Release artifact upload now uses gh release upload with --clobber instead of creating a new release. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5f85cf3 commit 4dd88f7

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: Release
22

33
on:
4-
push:
5-
tags:
6-
- '[0-9]*'
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: 'Release tag to build for (e.g., 1.3.4)'
10+
required: true
711

812
permissions:
913
contents: write
@@ -20,6 +24,7 @@ jobs:
2024
- name: Checkout Source Code
2125
uses: actions/checkout@v4
2226
with:
27+
ref: ${{ github.event.release.tag_name || github.event.inputs.tag }}
2328
fetch-depth: 0
2429

2530
- name: Setup JDK 25
@@ -43,14 +48,12 @@ jobs:
4348
cp target/scala-2.12/sbt-1.0/sbt-ossuminc-*.jar staging/
4449
ls -la staging/
4550
46-
- name: Create GitHub Release
51+
- name: Upload Artifacts to Release
4752
env:
4853
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4954
run: |
50-
gh release create "${{ github.ref_name }}" \
51-
--title "v${{ github.ref_name }}" \
52-
--generate-notes \
53-
staging/*.jar
55+
TAG="${{ github.event.release.tag_name || github.event.inputs.tag }}"
56+
gh release upload "$TAG" staging/*.jar --clobber
5457
5558
- name: Cleanup Before Caching
5659
shell: bash

0 commit comments

Comments
 (0)