Skip to content

Commit 426e836

Browse files
committed
Update release workflow
1 parent 0e7d495 commit 426e836

1 file changed

Lines changed: 26 additions & 22 deletions

File tree

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
11
name: Build Postcompiler
22
on:
3-
schedule:
4-
- cron: '14 9 * * TUE' # Run at 9:14 (7:14pm local) on Tuesday
5-
create:
6-
ref_type: 'tag'
73
workflow_dispatch:
8-
# Allow triggering manually whenever it's useful.
9-
10-
permissions:
11-
contents: read
12-
pull-requests: read
4+
inputs:
5+
version:
6+
description: 'Release version'
7+
required: true
138

149
jobs:
1510
freeze:
1611
strategy:
1712
fail-fast: false
1813
matrix:
1914
include:
20-
# We want 3.8 because it works on Windows 7.
21-
- artifact-name: 'win32'
22-
python-version: '3.8.10'
23-
arch: 'x86'
24-
os: 'windows-latest'
2515
- artifact-name: 'win64'
2616
python-version: '3.11'
2717
arch: 'x64'
2818
os: 'windows-latest'
29-
- artifact-name: 'linux64'
30-
python-version: '3.11'
31-
arch: 'x64'
32-
os: 'ubuntu-latest'
19+
# - artifact-name: 'linux64'
20+
# python-version: '3.11'
21+
# arch: 'x64'
22+
# os: 'ubuntu-latest'
3323
runs-on: ${{ matrix.os }}
3424
steps:
3525
- name: Checkout
@@ -48,17 +38,31 @@ jobs:
4838
- name: Freeze application
4939
run: python -m PyInstaller --distpath ../build/ -y ../postcompiler.spec
5040
working-directory: ./src/
41+
- name: Zip hammeraddons_${{ matrix.artifact-name }}
42+
uses: thedoctor0/zip-release@master
43+
with:
44+
type: 'zip'
45+
directory: ./build/
46+
filename: 'hammeraddons_${{ matrix.artifact-name }}.zip'
5147
- name: Artifact upload (tag)
5248
uses: actions/upload-artifact@v3
5349
if: github.event_name == 'create'
5450
with:
55-
name: hammeraddons_${{ github.event.ref }}_${{ matrix.artifact-name }}
56-
path: ./build/
51+
name: hammeraddons_${{ github.event.inputs.version }}_${{ matrix.artifact-name }}
52+
path: ./build/hammeraddons_${{ matrix.artifact-name }}.zip
5753
if-no-files-found: error
5854
- name: Artifact upload (hash)
5955
uses: actions/upload-artifact@v3
6056
if: github.event_name != 'create'
6157
with:
62-
name: hammeraddons_${{ github.sha }}_${{ matrix.artifact-name }}
63-
path: ./build/
58+
name: hammeraddons_${{ github.event.inputs.version }}_${{ matrix.artifact-name }}
59+
path: ./build/hammeraddons_${{ matrix.artifact-name }}.zip
6460
if-no-files-found: error
61+
62+
- name: Create Release
63+
uses: softprops/action-gh-release@v1
64+
with:
65+
tag_name: ${{ github.event.inputs.version }}
66+
files: |
67+
./build/hammeraddons_${{ matrix.artifact-name }}.zip
68+
fail_on_unmatched_files: true

0 commit comments

Comments
 (0)