fix deprecated usage of set-output (#4699)
This commit is contained in:
parent
3d4858b840
commit
5854a635ca
4 changed files with 23 additions and 19 deletions
|
@ -4,6 +4,7 @@
|
||||||
# where SUFFIX is either available in the environment or as the first arg
|
# where SUFFIX is either available in the environment or as the first arg
|
||||||
# if MAKE_ZIP is set instead a zip is made
|
# if MAKE_ZIP is set instead a zip is made
|
||||||
# expected to be run in the build directory unless BUILD_DIR is set
|
# expected to be run in the build directory unless BUILD_DIR is set
|
||||||
|
# adds output to GITHUB_OUTPUT
|
||||||
builddir="${BUILD_DIR:=.}"
|
builddir="${BUILD_DIR:=.}"
|
||||||
findrx="Cockatrice-*.*"
|
findrx="Cockatrice-*.*"
|
||||||
|
|
||||||
|
@ -50,5 +51,5 @@ fi
|
||||||
cd "$oldpwd"
|
cd "$oldpwd"
|
||||||
relative_path="$path/$filename"
|
relative_path="$path/$filename"
|
||||||
ls -l "$relative_path"
|
ls -l "$relative_path"
|
||||||
echo "::set-output name=path::$relative_path"
|
echo "path=$relative_path" >>"$GITHUB_OUTPUT"
|
||||||
echo "::set-output name=name::$filename"
|
echo "name=$filename" >>"$GITHUB_OUTPUT"
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
# the releases are first made as drafts and will be vetted by a human
|
# the releases are first made as drafts and will be vetted by a human
|
||||||
# it just has to provide a template
|
# it just has to provide a template
|
||||||
# this requires the repo to be unshallowed
|
# this requires the repo to be unshallowed
|
||||||
|
# adds output to GITHUB_OUTPUT
|
||||||
template_path=".ci/release_template.md"
|
template_path=".ci/release_template.md"
|
||||||
body_path="/tmp/release.md"
|
body_path="/tmp/release.md"
|
||||||
beta_regex='beta'
|
beta_regex='beta'
|
||||||
|
@ -22,22 +23,22 @@ fi
|
||||||
|
|
||||||
# create title
|
# create title
|
||||||
if [[ $TAG =~ $beta_regex ]]; then
|
if [[ $TAG =~ $beta_regex ]]; then
|
||||||
echo "::set-output name=is_beta::yes"
|
echo "is_beta=yes" >>"$GITHUB_OUTPUT"
|
||||||
title="$TAG"
|
title="$TAG"
|
||||||
echo "creating beta release '$title'"
|
echo "creating beta release '$title'"
|
||||||
elif [[ ! $(cat CMakeLists.txt) =~ $name_regex ]]; then
|
elif [[ ! $(cat CMakeLists.txt) =~ $name_regex ]]; then
|
||||||
echo "::error file=$0::could not find releasename in CMakeLists.txt"
|
echo "::error file=$0::could not find releasename in CMakeLists.txt"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "::set-output name=is_beta::no"
|
echo "is_beta=no" >>"$GITHUB_OUTPUT"
|
||||||
name="${BASH_REMATCH[1]}"
|
name="${BASH_REMATCH[1]}"
|
||||||
version="${TAG##*-}"
|
version="${TAG##*-}"
|
||||||
title="Cockatrice $version: $name"
|
title="Cockatrice $version: $name"
|
||||||
no_beta=1
|
no_beta=1
|
||||||
echo "::set-output name=friendly_name::$name"
|
echo "friendly_name=$name" >>"$GITHUB_OUTPUT"
|
||||||
echo "creating full release '$title'"
|
echo "creating full release '$title'"
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=title::$title"
|
echo "title=$title" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
# add release notes template
|
# add release notes template
|
||||||
if [[ $no_beta ]]; then
|
if [[ $no_beta ]]; then
|
||||||
|
@ -60,9 +61,9 @@ fi
|
||||||
all_tags="
|
all_tags="
|
||||||
$(git tag)" # tags are ordered alphabetically
|
$(git tag)" # tags are ordered alphabetically
|
||||||
before="${all_tags%%
|
before="${all_tags%%
|
||||||
$TAG*}" # strip line with current tag an all lines after it
|
"$TAG"*}" # strip line with current tag an all lines after it
|
||||||
# note the extra newlines are needed to always have a last line
|
# note the extra newlines are needed to always have a last line
|
||||||
if [[ $all_tags == $before ]]; then
|
if [[ $all_tags == "$before" ]]; then
|
||||||
echo "::warning file=$0::could not find current tag"
|
echo "::warning file=$0::could not find current tag"
|
||||||
else
|
else
|
||||||
while
|
while
|
||||||
|
@ -74,7 +75,7 @@ else
|
||||||
beta_list+=" $previous" # add to list of skipped betas
|
beta_list+=" $previous" # add to list of skipped betas
|
||||||
next_before="${before%
|
next_before="${before%
|
||||||
*}" # strip the last line
|
*}" # strip the last line
|
||||||
if [[ $next_before == $before ]]; then
|
if [[ $next_before == "$before" ]]; then
|
||||||
unset previous
|
unset previous
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -108,5 +109,5 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# write to file
|
# write to file
|
||||||
echo "::set-output name=body_path::$body_path"
|
echo "body_path=$body_path" >>"$GITHUB_OUTPUT"
|
||||||
echo "$body" >"$body_path"
|
echo "$body" >"$body_path"
|
||||||
|
|
18
.github/workflows/desktop-build.yml
vendored
18
.github/workflows/desktop-build.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cancel previous runs
|
- name: Cancel previous runs
|
||||||
uses: styfle/cancel-workflow-action@0.9.1
|
uses: styfle/cancel-workflow-action@0.11.0
|
||||||
with:
|
with:
|
||||||
access_token: ${{github.token}} # needs other token https://github.com/styfle/cancel-workflow-action/issues/7
|
access_token: ${{github.token}} # needs other token https://github.com/styfle/cancel-workflow-action/issues/7
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ jobs:
|
||||||
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
|
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
|
||||||
sha="$GITHUB_SHA"
|
sha="$GITHUB_SHA"
|
||||||
tag="${GITHUB_REF/refs\/tags\//}"
|
tag="${GITHUB_REF/refs\/tags\//}"
|
||||||
echo "::set-output name=tag::$tag"
|
echo "tag=$tag" >>"$GITHUB_OUTPUT"
|
||||||
else # push to branch
|
else # push to branch
|
||||||
sha="$GITHUB_SHA"
|
sha="$GITHUB_SHA"
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=sha::$sha"
|
echo "sha=$sha" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
if: steps.configure.outputs.tag != null
|
if: steps.configure.outputs.tag != null
|
||||||
|
@ -126,7 +126,7 @@ jobs:
|
||||||
- name: Get cache timestamp
|
- name: Get cache timestamp
|
||||||
id: cache_timestamp
|
id: cache_timestamp
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "::set-output name=timestamp::$(date -u '+%Y%m%d%H%M%S')"
|
run: echo "timestamp=$(date -u '+%Y%m%d%H%M%S')" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
@ -156,13 +156,15 @@ jobs:
|
||||||
if: matrix.package != 'skip'
|
if: matrix.package != 'skip'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
suffix: '-${{matrix.distro}}'
|
BUILD_DIR: build
|
||||||
type: '${{matrix.package}}'
|
SUFFIX: '-${{matrix.distro}}'
|
||||||
distro: '${{matrix.distro}}'
|
distro: '${{matrix.distro}}'
|
||||||
|
type: '${{matrix.package}}'
|
||||||
run: |
|
run: |
|
||||||
source .ci/docker.sh
|
source .ci/docker.sh
|
||||||
RUN --server --release --package "$type" --suffix "$suffix" \
|
RUN --server --release --package "$type" --dir "$BUILD_DIR" \
|
||||||
--ccache "$CCACHE_SIZE" --parallel 2
|
--ccache "$CCACHE_SIZE" --parallel 2
|
||||||
|
.ci/name_build.sh
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
if: matrix.package != 'skip'
|
if: matrix.package != 'skip'
|
||||||
|
@ -339,7 +341,7 @@ jobs:
|
||||||
modules: ${{matrix.qt_modules}}
|
modules: ${{matrix.qt_modules}}
|
||||||
|
|
||||||
- name: Run vcpkg
|
- name: Run vcpkg
|
||||||
uses: lukka/run-vcpkg@v10.2
|
uses: lukka/run-vcpkg@v10.6
|
||||||
with:
|
with:
|
||||||
runVcpkgInstall: true
|
runVcpkgInstall: true
|
||||||
appendedCacheKey: ${{matrix.bit}}-bit
|
appendedCacheKey: ${{matrix.bit}}-bit
|
||||||
|
|
2
.github/workflows/translations.yml
vendored
2
.github/workflows/translations.yml
vendored
|
@ -50,7 +50,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set +e # do not fail, just save the exit state
|
set +e # do not fail, just save the exit state
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
echo "::set-output name=deploy::$?"
|
echo "deploy=$?" >>"$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
if: steps.check.outputs.deploy == '1'
|
if: steps.check.outputs.deploy == '1'
|
||||||
|
|
Loading…
Reference in a new issue