Skip to content

Commit

Permalink
Merge pull request #54 from vst/49-automate-static-executable-builds
Browse files Browse the repository at this point in the history
Automate Builds for Static Executable Release Artifact
  • Loading branch information
vst authored Apr 6, 2024
2 parents 70ffb3e + 252c1fe commit fa41447
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,37 @@ permissions:
pull-requests: "write"

jobs:
build:
runs-on: "ubuntu-22.04"
release-please:
runs-on: "ubuntu-latest"

steps:
- name: "Release"
- id: "release"
name: "Release"
uses: "google-github-actions/release-please-action@v4"

- name: "Checkout Codebase"
if: "${{ steps.release.outputs.release_created }}"
uses: "actions/checkout@v4"

- name: "Install nix"
if: "${{ steps.release.outputs.release_created }}"
uses: "cachix/install-nix-action@v25"
with:
nix_path: "nixpkgs=channel:nixos-23.11"
extra_nix_config: "system-features = benchmark, big-parallel, nixos-test, uid-range, kvm"

- name: "Use magic Nix cache"
if: "${{ steps.release.outputs.release_created }}"
uses: "DeterminateSystems/magic-nix-cache-action@v3"

- name: "Check Application"
if: "${{ steps.release.outputs.release_created }}"
run: |
nix-shell --run "bash build-static.sh"
- name: "Upload Release Artifact"
if: "${{ steps.release.outputs.release_created }}"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
gh release upload "${{ steps.release.outputs.tag_name }}" /tmp/lhp-static-linux-x86_64

0 comments on commit fa41447

Please sign in to comment.