mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Manually git hash when publishing source AUR package
This commit is contained in:
parent
55f1e1d32d
commit
dcbe433a9c
2 changed files with 6 additions and 1 deletions
1
.github/scripts/PKGBUILD.source
vendored
1
.github/scripts/PKGBUILD.source
vendored
|
|
@ -21,6 +21,7 @@ build() {
|
||||||
export CARGO_HOME="$srcdir/cargo-home"
|
export CARGO_HOME="$srcdir/cargo-home"
|
||||||
export RUSTUP_TOOLCHAIN=stable
|
export RUSTUP_TOOLCHAIN=stable
|
||||||
|
|
||||||
|
export CRUNCHY_CLI_GIT_HASH=$CI_GIT_HASH
|
||||||
cargo build --release
|
cargo build --release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
|
|
@ -20,11 +20,15 @@ jobs:
|
||||||
curl -LO https://github.com/crunchy-labs/crunchy-cli/archive/refs/tags/${{ github.ref_name }}.tar.gz
|
curl -LO https://github.com/crunchy-labs/crunchy-cli/archive/refs/tags/${{ github.ref_name }}.tar.gz
|
||||||
echo "CRUNCHY_CLI_SHA256=$(sha256sum ${{ github.ref_name }}.tar.gz | cut -f 1 -d ' ')" >> $GITHUB_ENV
|
echo "CRUNCHY_CLI_SHA256=$(sha256sum ${{ github.ref_name }}.tar.gz | cut -f 1 -d ' ')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Get release commit hash
|
||||||
|
run: echo "CRUNCHY_CLI_GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Generate crunchy-cli PKGBUILD
|
- name: Generate crunchy-cli PKGBUILD
|
||||||
env:
|
env:
|
||||||
CI_PKG_VERSION: ${{ env.RELEASE_VERSION }}
|
CI_PKG_VERSION: ${{ env.RELEASE_VERSION }}
|
||||||
CI_SHA_SUM: ${{ env.CRUNCHY_CLI_SHA256 }}
|
CI_SHA_SUM: ${{ env.CRUNCHY_CLI_SHA256 }}
|
||||||
run: envsubst '$CI_PKG_VERSION,$CI_SHA_SUM' < .github/scripts/PKGBUILD.source > PKGBUILD
|
CI_GIT_HASH: ${{ env.CRUNCHY_CLI_GIT_HASH }}
|
||||||
|
run: envsubst '$CI_PKG_VERSION,$CI_SHA_SUM,$CI_GIT_HASH' < .github/scripts/PKGBUILD.source > PKGBUILD
|
||||||
|
|
||||||
- name: Publish crunchy-cli to AUR
|
- name: Publish crunchy-cli to AUR
|
||||||
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
|
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue