Skip to content

Bump the github-actions group across 1 directory with 3 updates (#999) #270

Bump the github-actions group across 1 directory with 3 updates (#999)

Bump the github-actions group across 1 directory with 3 updates (#999) #270

# - changesets will open a PR to bump versions when new changesets are added
# - changesets will publish packages when that PR is merged
# (it's confusing because the same action does two super different things)
name: Format, Version or Publish Packages
on:
workflow_dispatch:
push:
branches:
- main
permissions:
pull-requests: write
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
token: ${{ secrets.TYPESCRIPT_BOT_TOKEN }}
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- run: pnpm install
- run: pnpm build
- run: pnpm test
- name: format
run: |
pnpm format
if [ -n "`git status -s`" ]; then
git config user.email "typescriptbot@microsoft.com"
git config user.name "TypeScript Bot"
git commit -am "Format"
git push
fi
- uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
with:
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.TYPESCRIPT_BOT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}