Skip to content

[docs] Added edit this page link #61

[docs] Added edit this page link

[docs] Added edit this page link #61

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
changes:
runs-on: ubuntu-latest
if: github.repository == 'greatsquare0/thy-weaver'
outputs:
docs: ${{ steps.filter.outputs.changeset }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if changeset folder changed
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
changesets:
- ".changeset/**"
release:
permissions:
id-token: write # for provenance
contents: write
issues: write
pull-requests: write
needs:
- changes
if: ${{needs.changes.outputs.changeset == 'true'}}
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depht: 0
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: "pnpm"
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm run ci:version
publish: pnpm publish -r --access public
commit: "[chore] version bumped"
title: "[chore] version bumped"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true