Merge pull request #143 from Typeform/feat/TU-33147 #44
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - beta | |
| jobs: | |
| release: | |
| name: release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: Get yarn cache | |
| uses: actions/cache@v3 | |
| id: yarn-cache | |
| with: | |
| path: | | |
| **/node_modules | |
| ~/.cache | |
| key: ${{ runner.os }}-node-16-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }} | |
| - name: Install Node.js dependencies | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| run: yarn install --frozen-lockfile | |
| - name: Build | |
| run: yarn build | |
| # Configure registry for GitHub Packages | |
| - run: rm ./.npmrc | |
| - run: npm config set '//npm.pkg.github.com/:_authToken' $GH_TOKEN | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Release | |
| if: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/beta') }} | |
| run: yarn release | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} |