From ae9a94429aba042e3dc4eedcffbd7c3c7504cf4e Mon Sep 17 00:00:00 2001 From: Reese Williams Date: Wed, 20 Dec 2023 02:10:58 +0000 Subject: [PATCH] Some updates --- .github/workflows/preview-release.yaml | 11 ++++++++--- script/make_release | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/preview-release.yaml b/.github/workflows/preview-release.yaml index 826f5dd3..c92f0d9f 100644 --- a/.github/workflows/preview-release.yaml +++ b/.github/workflows/preview-release.yaml @@ -1,7 +1,13 @@ name: Release on: + workflow_run: + workflows: ["CI"] + types: + - completed push: + # Run only on trunk pushes that aren't a new tag release branches: "*" + tags-ignore: "*" env: BUNDLE_PATH: /tmp/.bundle @@ -51,9 +57,6 @@ jobs: run: | brew install automake bison echo "/usr/local/opt/bison/bin:$PATH" >> $GITHUB_PATH - - run: ./script/test.sh - env: - TARGET: ${{ matrix.target }} - run: ./script/make_release - uses: actions/upload-artifact@v3 with: @@ -77,6 +80,8 @@ jobs: path: "out/release/source" release: runs-on: macos-latest + # Only run release build if test workflows passed + if: ${{ github.event.workflow_run.conclusion == 'success' }} needs: - build - source-release diff --git a/script/make_release b/script/make_release index 9234bfb7..a94043cc 100755 --- a/script/make_release +++ b/script/make_release @@ -7,7 +7,7 @@ if [[ $OSTYPE == "darwin"* ]]; then fi bison --version -TAG=$(git describe --exact-match HEAD) +TAG=$(git describe --tags --abbrev=0) RELEASE_DIR=${RELEASE_DIR:-"tmp/releases/${TAG}-$(uname -s)/"} ./script/test.sh