From f5fba168fe456a62b79a814582d86f379a6c3f69 Mon Sep 17 00:00:00 2001 From: mppbtw Date: Wed, 15 Oct 2025 19:44:06 +0100 Subject: [PATCH 1/3] updated github workflows and actions --- .../actions/build-x86_64_linux_gnu/action.yml | 30 +++++++++++++++++++ .../actions/build-x86_64_linux_nix/action.yml | 11 +++++++ .github/workflows/build.yml | 23 -------------- .../workflows/publish-x86_64_linux_gnu.yml | 21 +++++++++++++ .../workflows/publish-x86_64_linux_nix.yml | 17 +++++++++++ .../workflows/push-build-x86_64_linux_gnu.yml | 21 +++++++++++++ 6 files changed, 100 insertions(+), 23 deletions(-) create mode 100644 .github/actions/build-x86_64_linux_gnu/action.yml create mode 100644 .github/actions/build-x86_64_linux_nix/action.yml delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/publish-x86_64_linux_gnu.yml create mode 100644 .github/workflows/publish-x86_64_linux_nix.yml create mode 100644 .github/workflows/push-build-x86_64_linux_gnu.yml diff --git a/.github/actions/build-x86_64_linux_gnu/action.yml b/.github/actions/build-x86_64_linux_gnu/action.yml new file mode 100644 index 0000000..6e127df --- /dev/null +++ b/.github/actions/build-x86_64_linux_gnu/action.yml @@ -0,0 +1,30 @@ +name: build x86_64_linux_gnu + +runs: + using: composite + steps: + - name: get system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libgl1-mesa-dev \ + xorg-dev \ + libxi-dev \ + libxcursor-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxxf86vm-dev \ + libgl1-mesa-dev \ + libx11-dev \ + libxext-dev \ + libwayland-dev \ + libwayland-egl1-mesa \ + libwayland-egl-backend-dev \ + pkg-config + shell: bash + + - name: compile + run: | + mkdir -p dist + GOOS=linux GOARCH=amd64 go build -o dist/hexecute-x86_64-linux-gnu . + shell: bash diff --git a/.github/actions/build-x86_64_linux_nix/action.yml b/.github/actions/build-x86_64_linux_nix/action.yml new file mode 100644 index 0000000..c8e9fa9 --- /dev/null +++ b/.github/actions/build-x86_64_linux_nix/action.yml @@ -0,0 +1,11 @@ +name: build x86_64_linux_nix + +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: DeterminateSystems/flake-checker-action@main + - run: nix build . + shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 166ef01..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Build hexecute - -on: - push: - -jobs: - build: - runs-on: ubuntu-latest - permissions: - id-token: "write" - contents: "read" - steps: - - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: DeterminateSystems/flake-checker-action@main - - name: Run `nix build` - run: nix build . - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: hexecute - path: ./result/bin/ diff --git a/.github/workflows/publish-x86_64_linux_gnu.yml b/.github/workflows/publish-x86_64_linux_gnu.yml new file mode 100644 index 0000000..db08122 --- /dev/null +++ b/.github/workflows/publish-x86_64_linux_gnu.yml @@ -0,0 +1,21 @@ +name: build and upload generic release binary + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 1.21 + + - uses: ./.github/actions/build-x86_64_linux_gnu + + - name: publish binary to release page + uses: softprops/action-gh-release@v2 + with: + files: dist/hexecute-x86_64-linux-gnu diff --git a/.github/workflows/publish-x86_64_linux_nix.yml b/.github/workflows/publish-x86_64_linux_nix.yml new file mode 100644 index 0000000..d8232d5 --- /dev/null +++ b/.github/workflows/publish-x86_64_linux_nix.yml @@ -0,0 +1,17 @@ +name: build and upload nix release binary + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - uses: ./.github/actions/build-x86_64_linux_nix + + - name: publish binary to release page + uses: softprops/action-gh-release@v2 + with: + files: result/bin/hexecute diff --git a/.github/workflows/push-build-x86_64_linux_gnu.yml b/.github/workflows/push-build-x86_64_linux_gnu.yml new file mode 100644 index 0000000..47bd04b --- /dev/null +++ b/.github/workflows/push-build-x86_64_linux_gnu.yml @@ -0,0 +1,21 @@ +name: build and upload generic release binary + +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 1.21 + + - uses: ./.github/actions/build-x86_64_linux_gnu + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: hexecute + path: ./result/bin-x86_64_linux_gnu From 89a56e8e5b15e904f559ba84512d2f0b0f93b3a9 Mon Sep 17 00:00:00 2001 From: mppbtw Date: Wed, 15 Oct 2025 19:49:48 +0100 Subject: [PATCH 2/3] Update checkout action version in workflow --- .github/workflows/publish-x86_64_linux_nix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-x86_64_linux_nix.yml b/.github/workflows/publish-x86_64_linux_nix.yml index d8232d5..2b0e7db 100644 --- a/.github/workflows/publish-x86_64_linux_nix.yml +++ b/.github/workflows/publish-x86_64_linux_nix.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - + - uses: actions/checkout@v4 - uses: ./.github/actions/build-x86_64_linux_nix - name: publish binary to release page From d608089a0ede910269e11c16f471b5145c53dc84 Mon Sep 17 00:00:00 2001 From: mppbtw Date: Wed, 15 Oct 2025 19:56:27 +0100 Subject: [PATCH 3/3] Update binary file name for release publishing --- .github/workflows/publish-x86_64_linux_nix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-x86_64_linux_nix.yml b/.github/workflows/publish-x86_64_linux_nix.yml index 2b0e7db..e85c942 100644 --- a/.github/workflows/publish-x86_64_linux_nix.yml +++ b/.github/workflows/publish-x86_64_linux_nix.yml @@ -14,4 +14,4 @@ jobs: - name: publish binary to release page uses: softprops/action-gh-release@v2 with: - files: result/bin/hexecute + files: result/bin/hexecute-x86_64_linux_nix