-
Notifications
You must be signed in to change notification settings - Fork 12
54 lines (47 loc) · 1.45 KB
/
main.yml
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
name: Package
on:
workflow_dispatch:
inputs:
tags:
description: 'test build tags'
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: version
run: echo "version=${{ inputs.tags }}" >> $GITHUB_STATE
id: version
- name: release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.tags }}
- name: Package Application
uses: JackMcKew/pyinstaller-action-windows@python3-10-pyinstaller-5-3
with:
path: .
pypi_index_url: https://pypi.tuna.tsinghua.edu.cn/simple
- name: Copy Files and Tar
run: |
cp config.yaml LICENSE README.md README_zh.md dist/windows
cp -r imgs dist/windows
cp -r resources dist/windows
cd dist/windows && zip -q -r projz_Winndows.zip ./* && cd -
# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v4
# id: artifact
# with:
# name: projz-Winndows_${{ inputs.tags }}
# path: dist/windows
- name: Upload Windows Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/windows/projz_Winndows.zip
asset_name: projz-Winndows_${{ inputs.tags }}.zip
asset_content_type: application/zip