diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index ab65e6faa4..caaae2218e 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -51,7 +51,12 @@ name: Build & Test -on: push +on: + push: + branches: + - '*' # This will make sure all push events on any branch triggers this workflow. + tags: + - '*' # This will make sure tag creations also trigger the workflow. env: NODE_VERSION: 18.x @@ -128,4 +133,30 @@ jobs: - name: Test uses: borales/actions-yarn@v4 with: - cmd: test \ No newline at end of file + cmd: test + + ########################################################################### + ## Commit to formio/enterprise + ########################################################################### + deploy_to_test: + if: startsWith(github.ref, 'refs/tags/') + needs: [build, test] + runs-on: ubuntu-latest + + steps: + - run: echo "Triggered by ${{ github.event_name }} event." + - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} + uses: actions/checkout@v3 + + - name: Restore node modules from cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Test + uses: borales/actions-yarn@v4 + with: + cmd: release \ No newline at end of file