diff --git a/.github/workflows/frozen-binaries.yml b/.github/workflows/frozen-binaries.yml deleted file mode 100644 index eeefb15..0000000 --- a/.github/workflows/frozen-binaries.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build frozen binaries - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - steps: - - name: Checkout code - uses: actions/checkout@v4.1.7 - - - name: Set up Python - uses: actions/setup-python@v5.1.1 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install pyinstaller - - - name: Build executable - run: pyinstaller --onefile --name pppoe-retriever --distpath ./dist pppoe-retriever.py - - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: frozen-binaries-${{matrix.os}} - path: dist/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d52c8b7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +on: + release: + types: [created] + +name: Create frozen binaries for release + +jobs: + + generate: + name: Create release-artifacts + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout the repository + uses: actions/checkout@master + + - name: Set up Python + uses: actions/setup-python@v5.1.1 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + - name: Build executable + run: pyinstaller --onefile --name pppoe-retriever-${{matrix.os}} --distpath ./dist pppoe-retriever.py + + - name: Upload frozen binaries to realease + uses: AButler/upload-release-assets@v3.0 + with: + files: "./dist/pppoe-retriever-${{matrix.os}}*" + repo-token: ${{ secrets.GITHUB_TOKEN }} + + \ No newline at end of file