Skip to content

Directly create .env.local file in template #12

Directly create .env.local file in template

Directly create .env.local file in template #12

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish to npm
on:
release:
types: [created]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Update version and publish
run: |
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v}
CURRENT_VERSION=$(jq -r .version package.json)
if [ "$VERSION" != "$CURRENT_VERSION" ]; then
pnpm version "$VERSION" --no-git-tag-version
fi
pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}