Merge pull request #105 from releaseband/fix/performance #101
This file contains 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: | |
release: | |
name: Publish & Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://npm.pkg.github.com' | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Release Please | |
uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
release_type: node | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check package versions | |
if: ${{ steps.release.outputs.releases_created }} | |
run: | | |
echo "Package versions:" | |
find . -name "package.json" -not -path "*/node_modules/*" -exec sh -c 'echo "$(jq -r .name {}) : $(jq -r .version {})"' \; | |
- name: Publish packages (dry run) | |
if: ${{ steps.release.outputs.releases_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pnpm publish -r --no-git-checks --dry-run | |
- name: Publish packages (actual) | |
if: ${{ steps.release.outputs.releases_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pnpm publish -r --no-git-checks |