Skip to content

Commit f37217e

Browse files
authored
Add GitHub Actions workflow for release on tag
This workflow automates the release process on tag pushes, allowing manual triggers and handling file uploads for GitHub releases.
1 parent 6e352ef commit f37217e

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release on tag
2+
3+
on:
4+
push:
5+
tags: ['v*'] # запускается при пуше тега v0.1, v0.2, v1.0 и т.п.
6+
workflow_dispatch: {} # позволяет запустить вручную из вкладки Actions
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
permissions:
12+
contents: write # нужно, чтобы создавать релиз и загружать файлы
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Pack
19+
shell: pwsh
20+
run: pwsh -NoProfile -File .\PackAll.ps1 -Overwrite
21+
22+
- name: Read checksums
23+
id: notes
24+
shell: pwsh
25+
run: |
26+
$s = Get-Content .\dist\SHA256SUMS.txt -Raw
27+
"notes<<EOF" | Out-File -Append -FilePath $env:GITHUB_OUTPUT
28+
$s | Out-File -Append -FilePath $env:GITHUB_OUTPUT
29+
"EOF" | Out-File -Append -FilePath $env:GITHUB_OUTPUT
30+
31+
- name: Publish GitHub Release
32+
uses: softprops/action-gh-release@v2
33+
with:
34+
tag_name: ${{ github.ref_name }}
35+
name: Vector Focus Kit ${{ github.ref_name }}
36+
body: ${{ steps.notes.outputs.notes }}
37+
files: |
38+
dist/*.zip
39+
dist/SHA256SUMS.txt

0 commit comments

Comments
 (0)