mirror of
https://github.com/FiloSottile/age.git
synced 2026-01-09 21:27:20 +00:00
.github/workflows: inject version into source release artifact
Updates #671 Updates golang/go#77020
This commit is contained in:
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -86,6 +86,11 @@ jobs:
|
||||
mkdir "$DIR/age"
|
||||
git archive --format=tar.gz HEAD | tar -xz -C "$DIR/age"
|
||||
( 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
|
||||
- name: Upload workflow artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user