Feat/emit dts #4
Workflow file for this run
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: PR | |
on: | |
pull_request: | |
jobs: | |
pr: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup variables | |
id: setup | |
run: | | |
cat package.json | grep "version" | sed 's/ "version": "\([^"]*\)",/\1/' >> .tmp-version | |
echo "VERSION=$(cat .tmp-version)" >> "$GITHUB_OUTPUT" | |
cat .tmp-version | |
rm .tmp-version | |
- name: Install dependencies | |
run: npm ci | |
- name: Code style | |
run: | | |
npm run lint | |
npm run prettier | |
- name: Unit Tests | |
run: npm test | |
# TODO: setup Playwright tests or remove this | |
# - name: Install Playwright Browsers | |
# run: npx playwright install --with-deps | |
# - name: Run Playwright tests | |
# run: npm run e2e | |
# - name: Keep test report | |
# uses: actions/upload-artifact@v4 | |
# if: always() | |
# with: | |
# name: playwright-report | |
# path: playwright-report/ | |
# retention-days: 30 | |
- name: Create release | |
if: always() | |
env: | |
VERSION: ${{ steps.setup.outputs.VERSION }} | |
run: | | |
npm run build | |
npm pack | |
- name: Keep release archive | |
uses: actions/upload-artifact@v4 | |
if: always() | |
env: | |
VERSION: ${{ steps.setup.outputs.VERSION }} | |
with: | |
name: talk-control-revealjs-extensions-${{env.VERSION}} | |
path: talk-control-revealjs-extensions-${{env.VERSION}}.tar.xz | |
retention-days: 30 |