Skip to content

Commit

Permalink
ci: publish for github release
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Jul 25, 2023
1 parent f8c5370 commit f125f92
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: lint
on:
pull_request:
push:
branches: [ main ]
branches: [main]
workflow_dispatch:

jobs:
Expand All @@ -16,7 +16,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip' # caching pip dependencies
cache: "pip" # caching pip dependencies
- run: pip install -r requirements.txt

- name: Ruff linting
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
release:
types: [published]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip" # caching pip dependencies

- name: Set up build tools
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pyinstaller
- name: Compile single executable for Linux
run: pyinstaller --onefile --noconfirm --clean --name=bitsrun src/bitsrun/cli.py

- name: Package binaries
run: |
cd dist
tar -czvf bitsrun.tar.gz bitsrun
cd -
- name: Upload binaries to GitHub release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/bitsrun.tar.gz
asset_name: bitsrun.tar.gz
tag: ${{ github.ref }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bitsrun"
version = "3.5.2"
version = "3.6.0"
description = "A headless login / logout script for 10.0.0.55"
authors = [{ name = "spencerwooo", email = "[email protected]" }]
dependencies = [
Expand Down

0 comments on commit f125f92

Please sign in to comment.