chore(repo): gitignore .vscode/settings.json, keep shared editor configs #153
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] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - name: Create release PR or publish | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm run version | |
| publish: pnpm run release | |
| title: 'chore(repo): version packages' | |
| commit: 'chore(repo): version packages' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| # While in `pre` mode, changesets publishes under `--tag rc`, leaving | |
| # `npm install <pkg>` stuck on whatever was on `latest` first. Since RCs | |
| # are what users are installing today, re-point `latest` (and `rc`) at | |
| # every just-published version, and force the wrapper's GitHub release | |
| # to be the repo's Latest (GitHub otherwise skips prereleases). | |
| - name: Promote published RCs to npm latest + GitHub Latest | |
| if: steps.changesets.outputs.published == 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| PUBLISHED: ${{ steps.changesets.outputs.publishedPackages }} | |
| run: | | |
| set -euo pipefail | |
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| echo "$PUBLISHED" | jq -c '.[]' | while read -r pkg; do | |
| name=$(echo "$pkg" | jq -r '.name') | |
| version=$(echo "$pkg" | jq -r '.version') | |
| echo "Promoting ${name}@${version} -> latest, rc" | |
| npm dist-tag add "${name}@${version}" latest | |
| npm dist-tag add "${name}@${version}" rc | |
| if [ "$name" = "ciderpress" ]; then | |
| echo "Marking ${name}@${version} as GitHub Latest" | |
| gh release edit "${name}@${version}" --prerelease=false --latest=true --repo "$GITHUB_REPOSITORY" | |
| fi | |
| done |