chore(release): version plugin-git 0.1.2 and plugin-lualine 0.1.2 #2
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: | |
| branches: [main] | |
| jobs: | |
| quality: | |
| name: Quality Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Wait for core packages | |
| run: | | |
| CORE_VERSION=$(node -p "require('./package.json').devDependencies['@vemjs/core'].replace(/^[^0-9]*/, '')") | |
| PLUGIN_API_VERSION=$(node -p "require('./package.json').devDependencies['@vemjs/plugin-api'].replace(/^[^0-9]*/, '')") | |
| for i in {1..30}; do | |
| if npm view "@vemjs/core@$CORE_VERSION" version >/dev/null 2>&1 && npm view "@vemjs/plugin-api@$PLUGIN_API_VERSION" version >/dev/null 2>&1; then | |
| exit 0 | |
| fi | |
| sleep 10 | |
| done | |
| echo "Timed out waiting for @vemjs/core@$CORE_VERSION and @vemjs/plugin-api@$PLUGIN_API_VERSION to be available on npm" >&2 | |
| exit 1 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build | |
| run: bun run build | |
| - name: Test | |
| run: bun run test | |
| - name: Lint | |
| run: bun run lint | |
| publish: | |
| name: Publish to npm | |
| needs: quality | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Wait for core packages | |
| run: | | |
| CORE_VERSION=$(node -p "require('./package.json').devDependencies['@vemjs/core'].replace(/^[^0-9]*/, '')") | |
| PLUGIN_API_VERSION=$(node -p "require('./package.json').devDependencies['@vemjs/plugin-api'].replace(/^[^0-9]*/, '')") | |
| for i in {1..30}; do | |
| if npm view "@vemjs/core@$CORE_VERSION" version >/dev/null 2>&1 && npm view "@vemjs/plugin-api@$PLUGIN_API_VERSION" version >/dev/null 2>&1; then | |
| exit 0 | |
| fi | |
| sleep 10 | |
| done | |
| echo "Timed out waiting for @vemjs/core@$CORE_VERSION and @vemjs/plugin-api@$PLUGIN_API_VERSION to be available on npm" >&2 | |
| exit 1 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build all packages | |
| run: bun run build | |
| - name: Setup npm token | |
| run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
| - name: Create Release PR or Publish | |
| uses: changesets/action@v1 | |
| with: | |
| publish: bun run release | |
| version: bun run version-packages | |
| commit: "chore: release version bump" | |
| title: "chore: release version bump" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |