-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.06 KB
/
release.yaml
File metadata and controls
45 lines (40 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
name: release
run-name: release ${{ inputs.tag }}
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to be released'
required: true
jobs:
verify-release:
name: Verify if tag is valid
runs-on: ubuntu-latest
steps:
- name: Checkout httpagent repository
uses: 'actions/checkout@v6'
with:
ref: ${{ github.ref }}
- name: Fetch tags
run: git fetch --tags
- name: 'Check if tag was already created'
shell: bash
run: >
git show-ref --tags ${{ github.event.inputs.tag }} --quiet \
&& exit 1 || exit 0
release:
name: Release
runs-on: ubuntu-latest
needs:
- verify-release
steps:
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.event.inputs.tag }}
tag_name: ${{ github.event.inputs.tag }}
generate_release_notes: true
target_commitish: ${{ github.sha }}