Skip to content

Commit 57d6487

Browse files
committed
ci: add publish-release workflow for automated GitHub releases
1 parent b05ceb7 commit 57d6487

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish Manual Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag/Versão (ex.: v2.1.0)'
8+
required: true
9+
default: 'v2.1.0'
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Find assets for tag
19+
id: aset
20+
run: |
21+
TAG='${{ inputs.tag }}'
22+
VER="${TAG#v}"
23+
ASSET_DIR="release/${VER}"
24+
echo "Using ${ASSET_DIR}"
25+
if [ ! -d "$ASSET_DIR" ]; then
26+
echo "Assets directory ${ASSET_DIR} not found" >&2
27+
exit 1
28+
fi
29+
echo "dir=${ASSET_DIR}" >> "$GITHUB_OUTPUT"
30+
31+
- name: Create/Update Release and Upload assets
32+
uses: softprops/action-gh-release@v2
33+
with:
34+
tag_name: ${{ inputs.tag }}
35+
files: |
36+
${{ steps.aset.outputs.dir }}/*
37+
${{ steps.aset.outputs.dir }}/mac/*
38+
${{ steps.aset.outputs.dir }}/win/*
39+
${{ steps.aset.outputs.dir }}/deb/*
40+
generate_release_notes: true
41+
body_path: ${{ steps.aset.outputs.dir }}/RELEASE-NOTES-TEMPLATE.md
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+

0 commit comments

Comments
 (0)