chore(deps): lock file maintenance #397
Workflow file for this run
This file contains 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: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
release: | |
# "released" events are emitted either when directly be released or be edited from pre-released. | |
types: [prereleased, released] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
package_name: | |
[ | |
standalone, | |
hello, | |
mymath, | |
string, | |
luxon-ext, | |
intended-rollback | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3.0.0 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: install and build | |
run: | | |
pnpm install | |
pnpm build | |
- name: update version | |
working-directory: packages/${{ matrix.package_name }} | |
if: github.event_name == 'release' | |
run: | | |
git config user.email "dummy@dummy" | |
git config user.name "dummy" | |
pnpm version from-git --allow-same-version --no-git-tag-version || true | |
- working-directory: packages/${{ matrix.package_name }} | |
run: pnpm pack | |
- name: Test installation | |
working-directory: packages/${{ matrix.package_name }} | |
run: | | |
set -eu | |
built_dir=$(pwd) | |
tempdir=$(mktemp -d) | |
cd $tempdir | |
pnpm add $built_dir/*.tgz | |
cd $built_dir | |
rm -rf $tempdir | |
- run: pnpm publish --access=public --no-git-checks | |
working-directory: packages/${{ matrix.package_name }} | |
if: github.event_name == 'release' && !github.event.release.prerelease | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |