add release action #1
Workflow file for this run
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 npm tarballs | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| - "v*.*" | |
| - "v*" | |
| jobs: | |
| pack-and-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build & pack docusaurus-plugin-openapi-docs | |
| working-directory: packages/docusaurus-plugin-openapi-docs | |
| run: | | |
| yarn build || npm run build | |
| npm pack | |
| - name: Build & pack docusaurus-theme-openapi-docs | |
| working-directory: packages/docusaurus-theme-openapi-docs | |
| run: | | |
| yarn build || npm run build | |
| npm pack | |
| - name: Create GitHub Release & upload tarballs | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| packages/docusaurus-plugin-openapi-docs/*.tgz | |
| packages/docusaurus-theme-openapi-docs/*.tgz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |