Trigger CI on skip changeset label #96
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 | ||
Check failure on line 1 in .github/workflows/release.yml
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
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 CLI end-to-end tests | ||
if: ${{ secrets.SALEOR_TOKEN != '' && secrets.SALEOR_URL != '' }} | ||
env: | ||
SALEOR_TOKEN: ${{ secrets.SALEOR_TOKEN }} | ||
SALEOR_URL: ${{ secrets.SALEOR_URL }} | ||
run: pnpm test:e2e: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 }} |