Merge pull request #90 from eryue0220/chore/update-license #16
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 NPM | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release NPM | |
if: github.repository == 'eryue0220/unplugin-stylex' | |
permissions: | |
contents: write | |
id-token: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org | |
scope: eryue0220 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build Packages | |
run: pnpm build | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
version: pnpm run changeset:version | |
commit: "chore: Update version for release" | |
title: "chore: Update version for release" | |
publish: pnpm run changeset:release | |
env: | |
NPM_CONFIG_PROVENANCE: false | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Needs access to publish to npm | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |