-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (37 loc) · 1.35 KB
/
Copy pathreleaseV3.yml
File metadata and controls
43 lines (37 loc) · 1.35 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
name: Release v3
on:
push:
branches:
- netfx
paths:
- 'YAF.SampleWebApplication/package.json'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- name: Extract version from package.json
id: version
run: |
VERSION=$(jq -r .version YAF.SampleWebApplication/package.json)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Check if release tag already exists
id: check_tag
run: |
if git ls-remote --tags origin "refs/tags/v${{ steps.version.outputs.version }}" | grep -q .; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- name: Create GitHub Release
if: steps.check_tag.outputs.exists == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ steps.version.outputs.version }}" \
--target netfx \
--title "YAF.NET v${{ steps.version.outputs.version }} Sample Web Application" \
--notes "This Application is a Standard Visual Studio Sample ASP.NET Application (.NET Framework 4.8.1), including YAF.NET v${{ steps.version.outputs.version }} integrated as Control on a Page."