Skip to content

fix(ci): prevent lockfile sync issues with pre-push hook and Changese… #13

fix(ci): prevent lockfile sync issues with pre-push hook and Changese…

fix(ci): prevent lockfile sync issues with pre-push hook and Changese… #13

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches: [ main ]
permissions:
contents: write
issues: read
pull-requests: write
id-token: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable Corepack (Yarn 4)
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn lint
- name: Build packages
run: yarn build
- name: Dry-run pack (all workspaces)
run: yarn workspaces foreach -A -v exec npm pack --dry-run
release:
needs: quality
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable Corepack (Yarn 4)
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Build packages
run: yarn build
- name: Dry-run pack
run: yarn workspaces foreach -A -v exec npm pack --dry-run
- name: Publish with Changesets
uses: changesets/action@v1
with:
version: yarn changeset version && yarn install
publish: yarn changeset publish
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'
- name: Upload npm debug logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: npm-debug-logs
path: /home/runner/work/touchspin/touchspin/.npm-cache/_logs/*.log