From 8252524e74c8ab0e23460fa91cf46ff3974cc6cd Mon Sep 17 00:00:00 2001 From: Bastien Faure Date: Sun, 2 Jun 2024 01:16:00 -0700 Subject: [PATCH 1/3] Increase version and try new release system --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 78a3e6e..ed453e6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.55 +1.0.56 From 7d4f7708b79521fc79668f443c5db52baf65cb5b Mon Sep 17 00:00:00 2001 From: Bastien Faure Date: Sun, 2 Jun 2024 01:21:15 -0700 Subject: [PATCH 2/3] Revert "Simplified workflows" This reverts commit 7927581240007dcdb768c246bb2ea6868e967be2. --- .github/workflows/build.yml | 101 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 88 +---------------------------- README.rst | 4 +- 3 files changed, 104 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..091d54a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,101 @@ +name: Build Tests + +on: + workflow_dispatch: + branches: [master] + push: + branches: [master] + paths: + - '**.py' + - 'pdm.lock' + - VERSION + +permissions: + id-token: write + contents: read + +jobs: + linux-build: + name: Linux Build + runs-on: "ubuntu-latest" + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: PDM + run: python3.12 -m pip install pdm + + - name: Install libkrb5-dev + run: sudo apt-get install -y libkrb5-dev + + - name: Installs dev deps and package + run : | + pdm export -f requirements --without-hashes --dev > requirements.txt + python3.12 -m pip install -r requirements.txt + + - name: Build + run: | + python3.12 -m nuitka --standalone --onefile --output-filename=ldeep.bin ldeep/__main__.py + mv ldeep.bin ldeep_linux-amd64 + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: linux + path: ldeep_linux-amd64 + + windows-build: + name: Windows Build + runs-on: "windows-latest" + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.12" + - name: PDM + run: python3 -m pip install pdm + + - name: Installs dev deps and package + run: | + pdm export -f requirements --without-hashes --dev > requirements.txt + python3 -m pip install -r requirements.txt + + - name: Build + run: | + python3 -m nuitka --standalone --assume-yes-for-downloads --output-filename=ldeep.exe --onefile ldeep/__main__.py + mv ldeep.exe ldeep_windows-amd64.exe + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: windows + path: ldeep_windows-amd64.exe + + macos-build: + name: MacOS ARM64 Build + runs-on: "macos-latest" + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: PDM + run: python3.12 -m pip install pdm + + - name: Installs dev deps and package + run: | + pdm export -f requirements --without-hashes --dev > requirements.txt + python3.12 -m pip install -r requirements.txt + + - name: Build + run: | + python3.12 -m nuitka --standalone --onefile --output-filename=ldeep.bin ldeep/__main__.py + mv ldeep.bin ldeep_macos-amd64 + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: macos + path: ldeep_macos-amd64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa2ff8c..3f8f735 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,93 +5,7 @@ on: - 'release' jobs: - linux-build: - name: Linux Build - runs-on: "ubuntu-latest" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.12" - - - name: PDM - run: python3.12 -m pip install pdm - - - name: Install libkrb5-dev - run: sudo apt-get install -y libkrb5-dev - - - name: Installs dev deps and package - run : | - pdm export -f requirements --without-hashes --dev > requirements.txt - python3.12 -m pip install -r requirements.txt - - - name: Build - run: | - python3.12 -m nuitka --standalone --onefile --output-filename=ldeep.bin ldeep/__main__.py - mv ldeep.bin ldeep_linux-amd64 - - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: linux - path: ldeep_linux-amd64 - - windows-build: - name: Windows Build - runs-on: "windows-latest" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.12" - - name: PDM - run: python3 -m pip install pdm - - - name: Installs dev deps and package - run: | - pdm export -f requirements --without-hashes --dev > requirements.txt - python3 -m pip install -r requirements.txt - - - name: Build - run: | - python3 -m nuitka --standalone --assume-yes-for-downloads --output-filename=ldeep.exe --onefile ldeep/__main__.py - mv ldeep.exe ldeep_windows-amd64.exe - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: windows - path: ldeep_windows-amd64.exe - - macos-build: - name: MacOS ARM64 Build - runs-on: "macos-latest" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.12" - - - name: PDM - run: python3.12 -m pip install pdm - - - name: Installs dev deps and package - run: | - pdm export -f requirements --without-hashes --dev > requirements.txt - python3.12 -m pip install -r requirements.txt - - - name: Build - run: | - python3.12 -m nuitka --standalone --onefile --output-filename=ldeep.bin ldeep/__main__.py - mv ldeep.bin ldeep_macos-amd64 - - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: macos - path: ldeep_macos-amd64 - release: - needs: [linux-build, windows-build, macos-build] - name: "Tagged release" + build: runs-on: ubuntu-latest permissions: id-token: write diff --git a/README.rst b/README.rst index 2ac9110..d5058a7 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,8 @@ Project Status ============== -.. image:: https://github.com/franc-pentest/ldeep/actions/workflows/release.yml/badge.svg - :target: https://github.com/franc-pentest/ldeep/actions/workflows/release.yml +.. image:: https://github.com/franc-pentest/ldeep/actions/workflows/build.yml/badge.svg + :target: https://github.com/franc-pentest/ldeep/actions/workflows/build.yml :alt: Build status .. image:: https://badgen.net/pypi/v/ldeep :target: https://pypi.org/project/ldeep/ From 6adfbf8b886f706eabfde5c515b1d35aafe4697d Mon Sep 17 00:00:00 2001 From: Bastien Faure Date: Sun, 2 Jun 2024 01:23:07 -0700 Subject: [PATCH 3/3] Github actions are hard --- .github/workflows/build.yml | 8 ++------ .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 091d54a..c6b5699 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,12 +3,8 @@ name: Build Tests on: workflow_dispatch: branches: [master] - push: - branches: [master] - paths: - - '**.py' - - 'pdm.lock' - - VERSION + pull-request: + branches: [release] permissions: id-token: write diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f8f735..f649630 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ name: Release and PyPi on: - pull_request: + push: branches: - 'release'