Build / Test / Deploy #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build / Test / Deploy | |
on: | |
workflow_dispatch: | |
# push: | |
# branches: | |
# - develop | |
# - main | |
# paths: | |
# - src/** | |
# - schemas/** | |
jobs: | |
build: | |
uses: ./.github/workflows/build_and_test.yml | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: 'yarn' | |
- run: yarn install | |
- run: yarn build | |
- id: deploy | |
run: | | |
SOURCE_CODE_TX_ID=$(yarn deploy 2>&1 | grep -oE '[a-zA-Z0-9_-]{43}') | |
echo "::set-output name=srcTxId::$SOURCE_CODE_TX_ID" # Set the output variable for this step | |
env: | |
JWK: ${{ secrets.JWK }} | |
- run: | | |
git tag "${{ steps.deploy.outputs.srcTxId }}" | |
git push --tags |