Skip to content

Commit a05aa86

Browse files
committed
ARTESCA-6420: add releases workflow
1 parent 48e41ab commit a05aa86

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/release.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag to be released'
8+
required: true
9+
10+
jobs:
11+
verify-release:
12+
name: Verify if tag is valid
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout arsenal-networking repository
16+
uses: 'actions/checkout@v3'
17+
with:
18+
ref: ${{ github.ref }}
19+
20+
- name: Fetch tags
21+
run: git fetch --tags
22+
23+
- name: 'Check if tag was already created'
24+
shell: bash
25+
run: >
26+
git show-ref --tags v${{ github.event.inputs.tag }} --quiet \
27+
&& exit 1 || exit 0
28+
29+
release:
30+
name: Release
31+
runs-on: ubuntu-latest
32+
needs:
33+
- verify-release
34+
steps:
35+
- name: Create Release
36+
uses: softprops/action-gh-release@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
name: Release ${{ github.event.inputs.tag }}
41+
tag_name: v${{ github.event.inputs.tag }}
42+
generate_release_notes: true
43+
target_commitish: ${{ github.sha }}

0 commit comments

Comments
 (0)