Skip to content

Commit

Permalink
add the action
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahaoxiang2000 committed Apr 22, 2024
1 parent b2b5374 commit 30de06a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Release

on:
push:
tags:
- "*"

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build application
run: |
pyinstaller --onefile antgst.py
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/antgst.exe
asset_name: antgst.exe
asset_content_type: application/octet-stream
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/.venv
*.csv
*.csv
*.spec
/build
/dist

0 comments on commit 30de06a

Please sign in to comment.