name: deploy
on:
release:
types: [published]
jobs:
deploy:
name: Build and upload to GitHub Releases
runs-on: ubuntu-latest
steps:
- name: Pull source
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Set up Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build statically-linked musl binary
run: nix build .#static -L
- name: Copy binary to working directory
run: |
cp result/bin/pwninit .
chmod +w pwninit
- name: Strip binary
run: strip pwninit
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: pwninit application/x-executable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}