diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 366ab2170..10e735079 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,11 +25,10 @@ jobs: restore-keys: ${{ runner.os }}-go- - run: make test.all - + # Building web console for server and cache it for release-* steps + # we'll do this in parallel with tests to gain a few seconds build-web-console: runs-on: ubuntu-latest - needs: - - test steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -48,10 +47,13 @@ jobs: working-directory: ./webconsole run: yarn build + - name: Cache console build + uses: actions/cache@v2 + with: { path: ./webconsole/dist, key: console-build } + release-linux: runs-on: ubuntu-latest - needs: - - build-web-console + needs: [ build-web-console, test ] env: BUILD_OS: linux BUILD_ARCH: amd64 @@ -63,14 +65,18 @@ jobs: - uses: actions/setup-go@v1 with: go-version: 1.17 + + - name: Restore console build from cache + uses: actions/cache@v2 + with: { path: ./webconsole/dist, key: console-build } + - run: make release-clean release - run: make upload if: ${{ !env.ACT }} release-darwin: runs-on: macos-latest - needs: - - build-web-console + needs: [ build-web-console, test ] env: BUILD_OS: darwin BUILD_ARCH: amd64 @@ -89,15 +95,18 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-go- + + - name: Restore console build from cache + uses: actions/cache@v2 + with: { path: ./webconsole, key: console-build } + - run: make release-clean release - run: make upload if: ${{ !env.ACT }} release-docker: runs-on: ubuntu-latest - needs: - - build-web-console - - release-linux + needs: [ release-linux ] env: BUILD_OS: linux BUILD_ARCH: amd64