2023-09-10 16:37:42 +00:00
|
|
|
name: "Build Nix package on Ubuntu"
|
2023-04-09 15:01:09 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-10 16:37:42 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: cachix/install-nix-action@v23
|
2023-04-09 15:01:09 +00:00
|
|
|
- name: Building package
|
2023-09-10 16:37:42 +00:00
|
|
|
run: nix build
|
|
|
|
- name: Get repository name
|
|
|
|
run: echo "REPO_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
|
2023-04-20 20:01:38 +00:00
|
|
|
- name: Get commit hash
|
|
|
|
run: echo "COMMIT_HASH=${GITHUB_SHA::6}" >> $GITHUB_ENV
|
2023-04-09 15:01:09 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-09-10 16:37:42 +00:00
|
|
|
name: ${{ env.REPO_NAME }}-${{ env.COMMIT_HASH }}-x86_64-linux
|
|
|
|
path: result/bin/${{ env.REPO_NAME }}
|