From 983f8826658a78c2b6ff8058378053c8e0bcea3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 18 Feb 2021 17:26:55 +0100 Subject: [PATCH] Merge "Build and Test" and "Publish" release jobs --- .github/workflows/release.yml | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c9e07f165bd..7e9341e60d45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,24 +31,6 @@ jobs: git diff --name-only HEAD^..HEAD fi; - build: - name: Build and Test - runs-on: ubuntu-latest - needs: log-updates - steps: - - uses: actions/checkout@v2 - - name: Build and Test - run: make prepublish - - uses: actions/upload-artifact@v2 - with: - name: build-artifact - path: | - codemods/*/**/* - eslint/*/**/* - packages/*/**/* - !**/test/** - !**/node_modules/** - git-version: name: Create git tag and commit runs-on: ubuntu-latest @@ -79,14 +61,13 @@ jobs: git push "https://babel-bot:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:"$branch" --follow-tags npm-release: - name: Publish release on npm + name: Build, Test and Publish runs-on: ubuntu-latest - needs: [git-version, build] + needs: git-version environment: npm # The default condition is success(), but this is false when one of the previous jobs is skipped if: | always() && - needs.build.result == 'success' && (needs.git-version.result == 'success' || needs.git-version.result == 'skipped') steps: - uses: actions/checkout@v2 @@ -96,9 +77,8 @@ jobs: if: needs.git-version.result == 'success' run: git checkout ${{ needs.git-version.outputs.branch }} - - uses: actions/download-artifact@v2 - with: - name: build-artifact + - name: Build and Test + run: make prepublish - name: Publish to npm run: yarn release-tool publish --yes @@ -108,11 +88,10 @@ jobs: github-release: name: Create GitHub release draft runs-on: ubuntu-latest - needs: [git-version, build] + needs: git-version # The default condition is success(), but this is false when one of the previous jobs is skipped if: | always() && - needs.build.result == 'success' && (needs.git-version.result == 'success' || needs.git-version.result == 'skipped') outputs: is-main: ${{ steps.is-main.outputs.result == 1 }}