Browse Source

Dont use set-output per Github Action warning

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

20
.github/workflows/build.yml

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

5
emacs-build.sh

@ -181,7 +181,10 @@ function action0_clone ()
if test "$emacs_apply_patches" = "yes"; then if test "$emacs_apply_patches" = "yes"; then
apply_patches "$emacs_source_dir" || true apply_patches "$emacs_source_dir" || true
fi 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 () function action1_ensure_packages ()

Loading…
Cancel
Save