Replace deprecated set-output command in Github Actions workflows (#1869)
This commit is contained in:
parent
fd9ecffef4
commit
827e4e53d5
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@ -70,7 +70,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Ref Type
|
- name: Ref Type
|
||||||
id: ref-type
|
id: ref-type
|
||||||
run: cargo run --package ref-type -- --reference ${{ github.ref }}
|
run: cargo run --package ref-type -- --reference ${{ github.ref }} >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
id: package
|
id: package
|
||||||
|
@ -37,11 +37,11 @@ case $OS in
|
|||||||
ubuntu-latest | macos-latest)
|
ubuntu-latest | macos-latest)
|
||||||
ARCHIVE=$DIST/just-$VERSION-$TARGET.tar.gz
|
ARCHIVE=$DIST/just-$VERSION-$TARGET.tar.gz
|
||||||
tar czf $ARCHIVE *
|
tar czf $ARCHIVE *
|
||||||
echo "::set-output name=archive::$ARCHIVE"
|
echo "archive=$ARCHIVE" >> $GITHUB_OUTPUT
|
||||||
;;
|
;;
|
||||||
windows-latest)
|
windows-latest)
|
||||||
ARCHIVE=$DIST/just-$VERSION-$TARGET.zip
|
ARCHIVE=$DIST/just-$VERSION-$TARGET.zip
|
||||||
7z a $ARCHIVE *
|
7z a $ARCHIVE *
|
||||||
echo "::set-output name=archive::`pwd -W`/just-$VERSION-$TARGET.zip"
|
echo "archive=`pwd -W`/just-$VERSION-$TARGET.zip" >> $GITHUB_OUTPUT
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -21,5 +21,5 @@ fn main() {
|
|||||||
eprintln!("ref: {}", arguments.reference);
|
eprintln!("ref: {}", arguments.reference);
|
||||||
eprintln!("value: {value}");
|
eprintln!("value: {value}");
|
||||||
|
|
||||||
println!("::set-output name=value::{value}");
|
println!("value={value}");
|
||||||
}
|
}
|
||||||
|
@ -16,29 +16,23 @@ fn stdout(reference: &str) -> String {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn junk_is_other() {
|
fn junk_is_other() {
|
||||||
assert_eq!(stdout("refs/tags/asdf"), "::set-output name=value::other\n");
|
assert_eq!(stdout("refs/tags/asdf"), "value=other\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn valid_version_is_release() {
|
fn valid_version_is_release() {
|
||||||
assert_eq!(
|
assert_eq!(stdout("refs/tags/0.0.0"), "value=release\n");
|
||||||
stdout("refs/tags/0.0.0"),
|
|
||||||
"::set-output name=value::release\n"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn valid_version_with_trailing_characters_is_other() {
|
fn valid_version_with_trailing_characters_is_other() {
|
||||||
assert_eq!(
|
assert_eq!(stdout("refs/tags/0.0.0-rc1"), "value=other\n");
|
||||||
stdout("refs/tags/0.0.0-rc1"),
|
|
||||||
"::set-output name=value::other\n"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn valid_version_with_lots_of_digits_is_release() {
|
fn valid_version_with_lots_of_digits_is_release() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
stdout("refs/tags/01232132.098327498374.43268473849734"),
|
stdout("refs/tags/01232132.098327498374.43268473849734"),
|
||||||
"::set-output name=value::release\n"
|
"value=release\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user