-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (69 loc) · 2.1 KB
/
Copy pathrelease.yml
File metadata and controls
84 lines (69 loc) · 2.1 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
name: ShellPDF CI/CD Release Pipeline
on:
push:
tags:
- 'v*.*.*'
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
test-and-build:
name: Build & Package Windows Executables
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Unit Test Suite
run: |
python -c "import logging; logging.disable(logging.CRITICAL); import unittest, sys; suite = unittest.defaultTestLoader.discover('tests'); res = unittest.TextTestRunner(stream=sys.stdout).run(suite); sys.exit(0 if res.wasSuccessful() else 1)"
- name: Install Inno Setup
run: |
choco install innosetup -y
echo "C:\Program Files (x86)\Inno Setup 6" >> $env:GITHUB_PATH
- name: Run Build Automation Pipeline
run: |
python build.py
- name: Run Release Packaging
run: |
python release.py
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: ShellPDF-Build-Artifacts
path: output/*
if-no-files-found: warn
create-github-release:
name: Publish GitHub Release
needs: test-and-build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: ShellPDF-Build-Artifacts
path: release-assets/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: release-assets/*
body_path: RELEASE_NOTES.md
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}