Remove deprecated set-env command (#553)

Remove deprecated set-env command

Environment files are to be used instead now:

https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
This commit is contained in:
Kirill Bobyrev 2020-10-15 11:36:18 +02:00 committed by GitHub
parent 5a40c019f1
commit f779426513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -86,15 +86,17 @@ jobs:
run: |
cmd /c "`"${{ matrix.config.vcvars }}`">NUL && set" | Foreach-Object {
$name, $value = $_ -split '=', 2
if ($value) { echo "::set-env name=$($name)::$($value)" }
if ($value) {
echo "$($name)=$($value)" >> $env:GITHUB_ENV
}
}
- name: Fetch target commit
uses: actions/download-artifact@v1
with: { name: release }
- name: Set target commit
run: |
echo ::set-env name=LLVM_COMMIT::$(cat release/commit)
echo ::set-env name=CLANGD_DIR::clangd_${{ github.event.release.tag_name }}
echo "LLVM_COMMIT=$(cat release/commit)" >> $GITHUB_ENV
echo "CLANGD_DIR=clangd_${{ github.event.release.tag_name }}" >> $GITHUB_ENV
shell: bash
- name: Clone LLVM
uses: actions/checkout@v2

View File

@ -31,8 +31,8 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Compute release info
run: |
echo ::set-env name=RELEASE_COMMIT_SHORT::$(printf "%.12s" ${{ steps.pick.outputs.sha }})
echo ::set-env name=RELEASE_DATE::$(date -u +%Y%m%d)
echo "RELEASE_COMMIT_SHORT=$(printf \"%.12s\" ${{ steps.pick.outputs.sha }})" >> $GITHUB_ENV
echo "RELEASE_DATE=$(date -u +%Y%m%d)" >> $GITHUB_ENV
- name: Create release
uses: actions/create-release@master
id: release