Merge pull request #43 from ooxml-tools/dependabot/npm_and_yarn/tsx-4… #144
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: ci | |
| on: | |
| push: | |
| branches: [main] | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: npm auth | |
| run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm test | |
| - run: NODE_OPTIONS="--max-old-space-size=4096" npm run build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm | |
| path: | | |
| ./dist/npm/ | |
| ./package.json | |
| ./README.md | |
| # percy: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: "20.x" | |
| # - name: Install Docker using Docker's official script | |
| # run: | | |
| # curl -fsSL https://get.docker.com -o get-docker.sh | |
| # sudo sh get-docker.sh | |
| # continue-on-error: false | |
| # - name: Install Docker Compose | |
| # run: | | |
| # sudo curl -L "https://github.com/docker/compose/releases/download/v2.30.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| # sudo chmod +x /usr/local/bin/docker-compose | |
| # docker-compose --version | |
| # continue-on-error: false | |
| # - name: install libreoffice | |
| # run: sudo apt update && sudo apt-get install -y libreoffice && libreoffice --help && command -v libreoffice && echo $? | |
| # - name: npm auth | |
| # run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
| # - run: npm ci | |
| # - run: PERCY_TOKEN=${{ secrets.PERCY_TOKEN }} ./scripts/percy.sh | |
| release: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: build | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: npm | |
| path: npm | |
| - run: | | |
| cd npm && zip -r ../npm.zip * && cd - | |
| - name: release | |
| uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda | |
| with: | |
| files: | | |
| npm.zip | |
| - run: | | |
| cd npm | |
| npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |