ci: Set version in scala (#571)

* Set version in scala

* Fix ident

* Try different variable

* Fix
This commit is contained in:
Anatolios Laskaris 2022-10-10 21:02:30 +03:00 committed by GitHub
parent 41fbdfca6c
commit 081dafdcec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -25,6 +25,13 @@ jobs:
with: with:
repository: fluencelabs/aqua 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 - name: Cache Scala
uses: coursier/cache-action@v6 uses: coursier/cache-action@v6
@ -32,6 +39,8 @@ jobs:
uses: coursier/setup-action@v1 uses: coursier/setup-action@v1
- name: Compile aqua - name: Compile aqua
env:
BUILD_NUMBER: ${{ steps.version.outputs.branch }}-${{ steps.version.outputs.sha }}-${{ github.run_number }}-${{ github.run_attempt }}
run: sbt "cliJS/fastOptJS" run: sbt "cliJS/fastOptJS"
- name: Upload compiled aqua - name: Upload compiled aqua
@ -94,7 +103,7 @@ jobs:
- name: Set fluence-js version from branch - name: Set fluence-js version from branch
if: inputs.fluence-js-version != '' if: inputs.fluence-js-version != ''
working-directory: npm 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 - run: npm run build
working-directory: npm working-directory: npm

View File

@ -37,4 +37,4 @@ jobs:
needs: snapshot needs: snapshot
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master
with: with:
aqua-version: "=${{ needs.snapshot.outputs.aqua-version }}" aqua-version: "${{ needs.snapshot.outputs.aqua-version }}"