Update release.yml #4
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: | |
# prevents this action from running on forks | |
if: github.repository == 'Lazy-work/unison' | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to create release (changesets/action) | |
id-token: write # OpenID Connect token needed for provenance | |
pull-requests: write # to create pull request (changesets/action) | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Packages | |
run: pnpm run build | |
- name: create and publish versions | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
version: pnpm version | |
publish: pnpm publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |