Skip to content

Commit

Permalink
build: fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bojand committed Nov 19, 2020
1 parent 5b0f16f commit 1a641f9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ jobs:
id: current-time

- name: Set version
# run: echo "::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//}"
run: echo "::set-env name=RELEASE_VERSION::$(git describe --tags $(git rev-list --tags --max-count=1))"
run: |
echo 'RELEASE_VERSION<<EOF' >> $GITHUB_ENV
git describe --tags $(git rev-list --tags --max-count=1) >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Build ghz
run: |
Expand Down Expand Up @@ -87,7 +89,10 @@ jobs:
run: git fetch --prune --unshallow

- name: Set version
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
run: |
echo 'RELEASE_VERSION<<EOF' >> $GITHUB_ENV
echo ${GITHUB_REF/refs\/tags\//} >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# These can be squashed when https://github.com/actions/download-artifact/issues/6 is closed
- name: Download releases from github_build
Expand Down Expand Up @@ -142,7 +147,7 @@ jobs:
run: git fetch --prune --unshallow

- name: Set version
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//}
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Bump formula
run: |
Expand All @@ -157,4 +162,4 @@ jobs:
brew bump-formula-pr --url=https://github.com/bojand/ghz/archive/${{ env.RELEASE_VERSION }}.tar.gz --message="Automated release pull request using continuous integration." --no-browse -v ghz --force
brew bump-formula-pr --url=https://github.com/bojand/ghz/archive/${{ env.RELEASE_VERSION }}.tar.gz --message="Automated release pull request using continuous integration." --no-browse -v ghz-web --force
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GH_PAGES_ACTION_TOKEN }}
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GH_PAGES_ACTION_TOKEN }}

0 comments on commit 1a641f9

Please sign in to comment.