diff --git a/.ci/name_build.sh b/.ci/name_build.sh index b7413b29..060f8a68 100755 --- a/.ci/name_build.sh +++ b/.ci/name_build.sh @@ -4,6 +4,7 @@ # where SUFFIX is either available in the environment or as the first arg # if MAKE_ZIP is set instead a zip is made # expected to be run in the build directory unless BUILD_DIR is set +# adds output to GITHUB_OUTPUT builddir="${BUILD_DIR:=.}" findrx="Cockatrice-*.*" @@ -50,5 +51,5 @@ fi cd "$oldpwd" relative_path="$path/$filename" ls -l "$relative_path" -echo "::set-output name=path::$relative_path" -echo "::set-output name=name::$filename" +echo "path=$relative_path" >>"$GITHUB_OUTPUT" +echo "name=$filename" >>"$GITHUB_OUTPUT" diff --git a/.ci/prep_release.sh b/.ci/prep_release.sh index 5bef26ee..cddf49aa 100755 --- a/.ci/prep_release.sh +++ b/.ci/prep_release.sh @@ -4,6 +4,7 @@ # the releases are first made as drafts and will be vetted by a human # it just has to provide a template # this requires the repo to be unshallowed +# adds output to GITHUB_OUTPUT template_path=".ci/release_template.md" body_path="/tmp/release.md" beta_regex='beta' @@ -22,22 +23,22 @@ fi # create title if [[ $TAG =~ $beta_regex ]]; then - echo "::set-output name=is_beta::yes" + echo "is_beta=yes" >>"$GITHUB_OUTPUT" title="$TAG" echo "creating beta release '$title'" elif [[ ! $(cat CMakeLists.txt) =~ $name_regex ]]; then echo "::error file=$0::could not find releasename in CMakeLists.txt" exit 1 else - echo "::set-output name=is_beta::no" + echo "is_beta=no" >>"$GITHUB_OUTPUT" name="${BASH_REMATCH[1]}" version="${TAG##*-}" title="Cockatrice $version: $name" no_beta=1 - echo "::set-output name=friendly_name::$name" + echo "friendly_name=$name" >>"$GITHUB_OUTPUT" echo "creating full release '$title'" fi -echo "::set-output name=title::$title" +echo "title=$title" >>"$GITHUB_OUTPUT" # add release notes template if [[ $no_beta ]]; then @@ -60,9 +61,9 @@ fi all_tags=" $(git tag)" # tags are ordered alphabetically 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 -if [[ $all_tags == $before ]]; then +if [[ $all_tags == "$before" ]]; then echo "::warning file=$0::could not find current tag" else while @@ -74,7 +75,7 @@ else beta_list+=" $previous" # add to list of skipped betas next_before="${before% *}" # strip the last line - if [[ $next_before == $before ]]; then + if [[ $next_before == "$before" ]]; then unset previous break fi @@ -108,5 +109,5 @@ else fi # write to file -echo "::set-output name=body_path::$body_path" +echo "body_path=$body_path" >>"$GITHUB_OUTPUT" echo "$body" >"$body_path" diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index e910fbff..c7e32927 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.1 + uses: styfle/cancel-workflow-action@0.11.0 with: 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 sha="$GITHUB_SHA" tag="${GITHUB_REF/refs\/tags\//}" - echo "::set-output name=tag::$tag" + echo "tag=$tag" >>"$GITHUB_OUTPUT" else # push to branch sha="$GITHUB_SHA" fi - echo "::set-output name=sha::$sha" + echo "sha=$sha" >>"$GITHUB_OUTPUT" - name: Checkout if: steps.configure.outputs.tag != null @@ -126,7 +126,7 @@ jobs: - name: Get cache timestamp id: cache_timestamp 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 uses: actions/cache@v3 @@ -156,13 +156,15 @@ jobs: if: matrix.package != 'skip' shell: bash env: - suffix: '-${{matrix.distro}}' - type: '${{matrix.package}}' + BUILD_DIR: build + SUFFIX: '-${{matrix.distro}}' distro: '${{matrix.distro}}' + type: '${{matrix.package}}' run: | source .ci/docker.sh - RUN --server --release --package "$type" --suffix "$suffix" \ + RUN --server --release --package "$type" --dir "$BUILD_DIR" \ --ccache "$CCACHE_SIZE" --parallel 2 + .ci/name_build.sh - name: Upload artifact if: matrix.package != 'skip' @@ -339,7 +341,7 @@ jobs: modules: ${{matrix.qt_modules}} - name: Run vcpkg - uses: lukka/run-vcpkg@v10.2 + uses: lukka/run-vcpkg@v10.6 with: runVcpkgInstall: true appendedCacheKey: ${{matrix.bit}}-bit diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index b8e7a20c..c9b10d0a 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -50,7 +50,7 @@ jobs: run: | set +e # do not fail, just save the exit state git diff --exit-code - echo "::set-output name=deploy::$?" + echo "deploy=$?" >>"$GITHUB_OUTPUT" - name: Commit changes if: steps.check.outputs.deploy == '1'