mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-25 04:20:22 +00:00
Override git describe in CI
This commit is contained in:
parent
c36e72b5f6
commit
a0485ff8d1
2 changed files with 30 additions and 12 deletions
21
.github/workflows/pre-release.yml
vendored
21
.github/workflows/pre-release.yml
vendored
|
@ -10,15 +10,20 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-linux
|
||||
- host: x86_64-linux
|
||||
target: x86_64-linux
|
||||
os: ubuntu-latest
|
||||
- target: aarch64-linux
|
||||
- host: x86_64-linux
|
||||
target: aarch64-linux
|
||||
os: ubuntu-latest
|
||||
- target: x86_64-windows
|
||||
- host: x86_64-linux
|
||||
target: x86_64-windows
|
||||
os: ubuntu-latest
|
||||
- target: x86_64-darwin
|
||||
- host: x86_64-darwin
|
||||
target: x86_64-darwin
|
||||
os: macos-13
|
||||
- target: aarch64-darwin
|
||||
- host: aarch64-darwin
|
||||
target: aarch64-darwin
|
||||
os: macos-14
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -37,7 +42,11 @@ jobs:
|
|||
extraPullNames: nix-community
|
||||
- name: Build release
|
||||
run: |
|
||||
nix build -L .#${{ matrix.target }}
|
||||
nix build -L --expr "
|
||||
(builtins.getFlake \"git+file://${PWD}?shallow=1&rev=$(git rev-parse HEAD)\")
|
||||
.outputs.packages.${{ matrix.host }}.${{ matrix.target }}.overrideAttrs {
|
||||
GIT_DESCRIBE = \"$(git describe --always)\";
|
||||
}"
|
||||
nix run -L .#${{ matrix.target }} -- --version
|
||||
- name: Upload release artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
|
@ -29,15 +29,20 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-linux
|
||||
- host: x86_64-linux
|
||||
target: x86_64-linux
|
||||
os: ubuntu-latest
|
||||
- target: aarch64-linux
|
||||
- host: x86_64-linux
|
||||
target: aarch64-linux
|
||||
os: ubuntu-latest
|
||||
- target: x86_64-windows
|
||||
- host: x86_64-linux
|
||||
target: x86_64-windows
|
||||
os: ubuntu-latest
|
||||
- target: x86_64-darwin
|
||||
- host: x86_64-darwin
|
||||
target: x86_64-darwin
|
||||
os: macos-13
|
||||
- target: aarch64-darwin
|
||||
- host: aarch64-darwin
|
||||
target: aarch64-darwin
|
||||
os: macos-14
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -55,7 +60,11 @@ jobs:
|
|||
extraPullNames: nix-community
|
||||
- name: Build release archive
|
||||
run: |
|
||||
nix build -L .#${{ matrix.target }}
|
||||
nix build -L --expr "
|
||||
(builtins.getFlake \"git+file://${PWD}?shallow=1&rev=$(git rev-parse HEAD)\")
|
||||
.outputs.packages.${{ matrix.host }}.${{ matrix.target }}.overrideAttrs {
|
||||
GIT_DESCRIBE = \"$(git describe)\";
|
||||
}"
|
||||
cp result/himalaya* .
|
||||
- name: Upload tgz release archive
|
||||
uses: actions/upload-release-asset@v1
|
||||
|
|
Loading…
Reference in a new issue