chore: update dependencies and add file search utility #14
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 | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| ci: | |
| name: CI - Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run TypeScript checks | |
| run: bun tsc --noEmit | |
| - name: Run Biome check | |
| run: bun biome ci . | |
| - name: Run tests | |
| run: bun test | |
| changelog: | |
| name: Generate changelog | |
| needs: ci | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_body: ${{ steps.git-cliff.outputs.content }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Generate changelog | |
| id: git-cliff | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: cliff.toml | |
| args: "--latest --strip all" | |
| env: | |
| OUTPUT: CHANGES.md | |
| GITHUB_REPO: ${{ github.repository }} | |
| release: | |
| name: Create GitHub Release | |
| needs: changelog | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Determine if prerelease | |
| id: prerelease | |
| run: | | |
| if [[ "${{ github.ref_name }}" == *"-"* ]]; then | |
| echo "is_prerelease=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "is_prerelease=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| body: ${{ needs.changelog.outputs.release_body }} | |
| prerelease: ${{ steps.prerelease.outputs.is_prerelease }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| publish-npm: | |
| name: Publish to NPM | |
| needs: changelog | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build package | |
| run: bun run build:prod | |
| - name: Setup Node.js for npmjs.org | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Force registry for scoped npm package | |
| run: echo "@eggl-js:registry=https://registry.npmjs.org/" >> ~/.npmrc | |
| - name: Publish to npmjs.org | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-github: | |
| name: Publish to GitHub Packages | |
| needs: changelog | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build package | |
| run: bun run build:prod | |
| - name: Setup Node.js for GitHub Packages | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| registry-url: "https://npm.pkg.github.com" | |
| scope: "@robert27" | |
| - name: Set scope for GitHub Packages | |
| run: | | |
| jq '.name = "@robert27/expo-github-cache"' package.json > tmp.json && mv tmp.json package.json | |
| - name: Publish to GitHub Packages | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |