mirror of
https://github.com/FiloSottile/age.git
synced 2026-03-11 08:55:41 +00:00
.github/workflows: inject version into source release artifact
Updates #671 Updates golang/go#77020
This commit is contained in:
parent
e4c611f778
commit
b8564adb6d
1 changed files with 5 additions and 0 deletions
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
|
@ -86,6 +86,11 @@ jobs:
|
||||||
mkdir "$DIR/age"
|
mkdir "$DIR/age"
|
||||||
git archive --format=tar.gz HEAD | tar -xz -C "$DIR/age"
|
git archive --format=tar.gz HEAD | tar -xz -C "$DIR/age"
|
||||||
( cd "$DIR/age"; go mod vendor )
|
( cd "$DIR/age"; go mod vendor )
|
||||||
|
for cmd in "$DIR"/age/{cmd,extra}/*; do
|
||||||
|
echo "package main" >> "$cmd/version.go"
|
||||||
|
echo "" >> "$cmd/version.go"
|
||||||
|
echo "func init() { Version = \"$VERSION\" }" >> "$cmd/version.go"
|
||||||
|
done
|
||||||
tar -cvzf "age-$VERSION-source.tar.gz" -C "$DIR" age
|
tar -cvzf "age-$VERSION-source.tar.gz" -C "$DIR" age
|
||||||
- name: Upload workflow artifacts
|
- name: Upload workflow artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue