Skip to content

Commit 1a88fbf

Browse files
Eneman DonatienEneman Donatien
authored andcommitted
[ENH] ✨ ci enhancement
1 parent 312faa0 commit 1a88fbf

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

.github/workflows/release.yaml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
11
on:
2-
push:
3-
# Sequence of patterns matched against refs/tags
4-
tags:
5-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
2+
workflow_dispatch:
3+
inputs:
4+
version:
5+
description: "version to release, e.g. v1.5.13"
6+
required: true
7+
default: "v0.1.0"
8+
source_ref:
9+
description: "source ref to publish from. E.g.: main or release-x.y"
10+
required: true
11+
default: "main"
12+
pre_release:
13+
description: "source ref to publish from. E.g.: main or release-x.y"
14+
required: true
15+
default: false
616

717
name: Upload Release Asset
818

919
jobs:
10-
upload-release-assets:
20+
release:
1121
name: Upload Release Asset
12-
needs: build-go
1322
runs-on: ubuntu-latest
1423
steps:
1524
- name: Checkout code
1625
uses: actions/checkout@v4
17-
- name: Download a single artifact
18-
uses: actions/download-artifact@v4
19-
with:
20-
name: manager
2126
- name: Create Release
2227
id: create_release
2328
uses: actions/create-release@v1
2429
env:
2530
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2631
with:
27-
tag_name: ${{ github.ref }}
28-
release_name: Release ${{ github.ref }}
32+
tag_name: ${{ github.event.inputs.source_ref }}
33+
release_name: Release ${{ github.event.inputs.version }}
2934
draft: false
30-
prerelease: false
31-
- name: Upload Release Asset
32-
id: upload-release-asset
33-
uses: actions/upload-release-asset@v1
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
with:
37-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
38-
asset_path: bin/manager
39-
asset_name: s3-operator
40-
asset_content_type: application/x-executable
35+
prerelease: ${{ github.event.inputs.source_ref }}

0 commit comments

Comments
 (0)