Merge pull request #120 from saleor/fix/ci-node-auth-token #97
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 | |
permissions: | |
contents: write | |
pull-requests: write | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Run tests | |
run: pnpm run test:ci | |
- name: Run linting | |
run: pnpm run lint | |
- name: Create Release Pull Request or Publish | |
uses: changesets/action@v1 | |
with: | |
version: pnpm run version | |
publish: pnpm run publish:ci-prod | |
title: "chore: release package" | |
commit: "chore: release package" | |
createGithubReleases: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |