Merge pull request #735 from terrestris/dependabot/npm_and_yarn/eslin… #256
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: Build latest release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources 🔰 | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js 20 🧮 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Cache Node.js modules 💾 | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.OS }}-node- | |
| ${{ runner.OS }}- | |
| - name: Install dependencies ⏬ | |
| run: npm ci | |
| - name: Build artifacts 🏗️ | |
| run: npm run build | |
| - name: Build docs 📔 | |
| run: npm run build:docs | |
| - name: Get the version 📎 | |
| run: | | |
| echo "VERSION=$(node -pe "require('./package.json').version")" >> $GITHUB_ENV | |
| - name: Deploy docs (latest) 🚀 | |
| uses: JamesIves/[email protected] | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| folder: build/docs | |
| target-folder: latest | |
| - name: Release 🚀 | |
| env: | |
| HUSKY: 0 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npx semantic-release |