From 081dafdcec2ac9dd0ab43e8a80a9d18880345ea5 Mon Sep 17 00:00:00 2001 From: Anatolios Laskaris Date: Mon, 10 Oct 2022 21:02:30 +0300 Subject: [PATCH] ci: Set version in scala (#571) * Set version in scala * Fix ident * Try different variable * Fix --- .github/workflows/snapshot.yml | 11 ++++++++++- .github/workflows/tests.yml | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index b0f58a86..1a51f5f7 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -25,6 +25,13 @@ jobs: with: repository: fluencelabs/aqua + - name: Generate version + id: version + run: | + SHA=${{ github.event.pull_request.head.sha }} + echo "::set-output name=sha::${SHA::7}" + echo "::set-output name=branch::${GITHUB_HEAD_REF//[^a-zA-Z0-9-]/-}" + - name: Cache Scala uses: coursier/cache-action@v6 @@ -32,6 +39,8 @@ jobs: uses: coursier/setup-action@v1 - name: Compile aqua + env: + BUILD_NUMBER: ${{ steps.version.outputs.branch }}-${{ steps.version.outputs.sha }}-${{ github.run_number }}-${{ github.run_attempt }} run: sbt "cliJS/fastOptJS" - name: Upload compiled aqua @@ -94,7 +103,7 @@ jobs: - name: Set fluence-js version from branch if: inputs.fluence-js-version != '' working-directory: npm - run: npm i --save @fluencelabs/fluence@${{ inputs.fluence-js-version }} + run: npm i --save -E @fluencelabs/fluence@${{ inputs.fluence-js-version }} - run: npm run build working-directory: npm diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e27ad4bd..774e9862 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,4 +37,4 @@ jobs: needs: snapshot uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master with: - aqua-version: "=${{ needs.snapshot.outputs.aqua-version }}" + aqua-version: "${{ needs.snapshot.outputs.aqua-version }}"