Browse Source

Dont use set-output per Github Action warning

pull/1/head
Kien Nguyen 2 years ago
parent
commit
91212f6a6f
  1. 18
      .github/workflows/build.yml
  2. 5
      emacs-build.sh

18
.github/workflows/build.yml

@ -42,14 +42,9 @@ jobs:
# This is the shortest job, but in this case it pulls all MSYS/MINGW64
- name: Clone Emacs
id: clone_repo_w
if: runner.os == 'Windows'
run: .\emacs-build.cmd --clone --repo https://github.com/kiennq/emacs.git --depth 1
- if: runner.os == 'Windows'
run: |
echo "EMACS_COMMIT=${{ steps.clone_repo_w.outputs.EMACS_COMMIT }}" >> $env:GITHUB_ENV
- name: Clone Emacs
if: runner.os != 'Windows'
run: |
@ -59,9 +54,14 @@ jobs:
echo "EMACS_COMMIT=`date +'%Y%m%d'`.`git rev-parse --short=7 HEAD`" >> $GITHUB_ENV
- name: Set package version
id: get_version
if: runner.os == 'Windows'
run: |
echo "EMACS_VER=29.${{ github.run_number }}.${{ env.EMACS_COMMIT }}" >> $env:GITHUB_ENV
- name: Set package version
if: runner.os != 'Windows'
run: |
echo "::set-output name=ver::29.${{ github.run_number }}.${{ env.EMACS_COMMIT }}"
echo "EMACS_VER=29.${{ github.run_number }}.${{ env.EMACS_COMMIT }}" >> $GITHUB_ENV
- name: Build and pack Emacs
if: runner.os == 'Windows'
@ -75,7 +75,7 @@ jobs:
run: |
chmod 755 ./emacs-build-unix.sh
mkdir -p ./zips
./emacs-build-unix.sh -s ./git/emacs/ -v ${{ steps.get_version.outputs.ver }} -d ./zips
./emacs-build-unix.sh -s ./git/emacs/ -v ${{ env.EMACS_VER }} -d ./zips
# Upload everything
- name: Upload binaries
@ -86,7 +86,7 @@ jobs:
if-no-files-found: error
outputs:
version: ${{ steps.get_version.outputs.ver }}
version: ${{ env.EMACS_VER }}
publish:
needs: build

5
emacs-build.sh

@ -181,7 +181,10 @@ function action0_clone ()
if test "$emacs_apply_patches" = "yes"; then
apply_patches "$emacs_source_dir" || true
fi
echo "::set-output name=EMACS_COMMIT::`git_version $emacs_source_dir`"
if test $GITHUB_ENV; then
echo "EMACS_COMMIT=`git_version $emacs_source_dir`" >> $GITHUB_ENV
fi
}
function action1_ensure_packages ()

Loading…
Cancel
Save