Skip to content

Commit c165a74

Browse files
authored
Create release.yml
1 parent 96808cc commit c165a74

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
name: Release
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
cache: 'pip'
22+
cache-dependency-path: 'requirements.txt'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install -r requirements.txt
27+
28+
- name: Build executables
29+
run: .\build.bat
30+
31+
# Partial credit goes to Strata Source for the action code below
32+
- name: Pack files
33+
uses: TheDoctor0/zip-release@0.7.6
34+
with:
35+
filename: build.zip
36+
path: ./build/
37+
38+
- name: Get previous tag
39+
id: previoustag
40+
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
41+
42+
- name: Next Monotonic Release version
43+
id: next
44+
uses: WyriHaximus/github-action-next-release-version@08a7476c98e8095fad1cce0e2344c7892e17d111
45+
with:
46+
version: ${{ steps.previoustag.outputs.tag }}
47+
48+
- name: Create Release
49+
uses: softprops/action-gh-release@v1
50+
if: ${{ github.event.inputs.version == '' }}
51+
with:
52+
tag_name: ${{ steps.next.outputs.version }}
53+
files: build.zip
54+
fail_on_unmatched_files: true
55+

0 commit comments

Comments
 (0)