feat(flow): add wrapFlow which is flow but returning a method #12
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: flowgen | |
| on: [push] | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| jobs: | |
| dependencies: | |
| name: π¦ Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| cache: "npm" | |
| - run: npm ci | |
| lint: | |
| name: π¬ Lint & Format | |
| runs-on: ubuntu-latest | |
| needs: [dependencies] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| cache: "npm" | |
| - run: npm ci | |
| - name: π¬ Lint & Format | |
| run: node --run lint:check | |
| audit: | |
| name: π‘οΈ Audit | |
| runs-on: ubuntu-latest | |
| needs: [dependencies] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| cache: "npm" | |
| - name: π‘οΈ Audit | |
| run: npm audit --audit-level=high | |
| spell: | |
| name: πΈ Spellcheck | |
| runs-on: ubuntu-latest | |
| needs: [dependencies] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| cache: "npm" | |
| - run: npm ci | |
| - name: πΈ Spellcheck | |
| run: node --run spell:check | |
| type: | |
| name: Κ¦ Typecheck | |
| runs-on: ubuntu-latest | |
| needs: [dependencies] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| cache: "npm" | |
| - run: npm ci | |
| - name: Κ¦ Typecheck | |
| run: node --run type:check | |
| test: | |
| name: β‘ Tests | |
| runs-on: ubuntu-latest | |
| needs: [dependencies] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| cache: "npm" | |
| - run: npm ci | |
| - name: β‘ Tests | |
| run: node --run test:coverage | |
| build-and-release: | |
| name: π Build & release | |
| needs: [lint, audit, spell, type, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| cache: "npm" | |
| - run: npm ci | |
| - name: π¨ Build | |
| run: node --run build | |
| - name: π Release | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: node --run semantic-release | |
| - name: π Preview release | |
| id: pack | |
| if: github.ref != 'refs/heads/main' | |
| run: echo "TARBALL=$(npm pack)" >> $GITHUB_OUTPUT | |
| - name: π¦ Upload package | |
| if: github.ref != 'refs/heads/main' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: package | |
| path: ${{ steps.pack.outputs.TARBALL }} |