-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (72 loc) · 2.25 KB
/
release.yml
File metadata and controls
90 lines (72 loc) · 2.25 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Release
on:
push:
branches:
- main
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
name: Create Release
steps:
- name: Checkout
uses: actions/checkout@v4
- run: git fetch --tags origin
- name: Get previous tag
id: previoustag
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Next Monotonic Release version
id: next
uses: WyriHaximus/github-action-next-release-version@08a7476c98e8095fad1cce0e2344c7892e17d111
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: Create Release
uses: softprops/action-gh-release@v1
if: ${{ github.event.inputs.version == '' }}
with:
tag_name: ${{ steps.next.outputs.version }}
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: $${{ matrix.os }}
name: Build
needs: create-release
if: ${{ always() && !cancelled() && needs.create-release.result == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12.10'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Build executables
run: |
chmod +x ./build.sh
$python_executable=python ./build.sh
shell: bash
# - name: Pack files
# uses: TheDoctor0/zip-release@0.7.6
# with:
# filename: Release-Win64.zip
# path: ./dist/
- run: git fetch --tags origin
- name: Get previous tag
id: previoustag
uses: 'WyriHaximus/github-action-get-previous-tag@v1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to release
uses: softprops/action-gh-release@v2
if: ${{ github.event.inputs.version == '' }}
with:
tag_name: ${{ steps.previoustag.outputs.tag }}
files: ./dist/*
fail_on_unmatched_files: true