-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.42 KB
/
Copy pathrelease.yaml
File metadata and controls
53 lines (49 loc) · 1.42 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
name: build-and-publish-on-tag
on:
push:
tags:
- '*'
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set RELEASE_VERSION
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Replace __version__
run: sed -i -e "s/__version__ =.*/__version__ = '${RELEASE_VERSION}'/" pteronode.py
- name: Push __version__ update
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: Bump version to ${RELEASE_VERSION}
file_pattern: pteronode.py
build-and-release:
runs-on: ubuntu-latest
needs: [update-version]
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: PyInstaller Linux
uses: JackMcKew/pyinstaller-action-linux@main
with:
path: .
spec: linux_build.spec
- name: PyInstaller Windows
uses: JackMcKew/pyinstaller-action-windows@main
with:
path: .
spec: windows_build.spec
- uses: actions/upload-artifact@v3
with:
name: pteronode-windows
path: dist
- uses: iamkubi/github-release@2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
gzip: false
generate_release_notes: true
files: >
dist/linux/pteronode
dist/windows/pteronode.exe