Skip to content

Commit

Permalink
GitHub workflow, upload artifacts or publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermodotn committed Aug 31, 2024
1 parent f007ee3 commit 99be6d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
on:
push:
branches:
- main
release:
types: [created]
types:
- created

name: Create frozen binaries for release

Expand Down Expand Up @@ -31,7 +35,15 @@ jobs:
- name: Build executable
run: pyinstaller --onefile --name pppoe-retriever-${{matrix.os}} --distpath ./dist pppoe-retriever.py

- name: Upload artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: pppoe-retriever-${{matrix.os}}
path: dist/

- name: Upload frozen binaries to realease
if: github.event_name == 'release' && github.event.action == 'created'
uses: AButler/[email protected]
with:
files: "./dist/pppoe-retriever-${{matrix.os}}*"
Expand Down
2 changes: 1 addition & 1 deletion pppoe-retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def main():

parser.add_argument('-i', '--interface', type=str, required=True, help='interface to monitor on')
parser.add_argument('-l', '--vlan', type=int, default=None, help='ethernet VLAN ID')
parser.add_argument('-r', '--range', type=int, const=100, default=1, nargs='?', help="range of VLAN ID's to try with (must be between 1 and 4096), this will be ignored if --vlan argument is provided")
parser.add_argument('-r', '--range', type=int, const=4096, default=50, nargs='?', help="range of VLAN ID's to try with (must be between 1 and 4096), this will be ignored if --vlan argument is provided")
parser.add_argument('-v', '--version', action='version', version='%(prog)s 1.1.0', help='version')

args = parser.parse_args()
Expand Down

0 comments on commit 99be6d7

Please sign in to comment.