chore: release v0.97.8 #49
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 latest | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/seed/package.json' | |
concurrency: | |
group: release-npm | |
cancel-in-progress: false | |
defaults: | |
run: | |
shell: devenv {0} | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
jobs: | |
build-and-publish: | |
runs-on: buildjet-4vcpu-ubuntu-2204 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check package version | |
id: cpv | |
uses: PostHog/check-package-version@v2 | |
with: | |
path: packages/seed | |
- name: Setup | |
if: steps.cpv.outputs.is-new-version == 'true' | |
uses: ./.github/actions/setup | |
- name: Setup npmrc auth for publish | |
if: steps.cpv.outputs.is-new-version == 'true' | |
run: | | |
echo '//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}' >> .npmrc && \ | |
echo "registry=https://registry.npmjs.org/" >> .npmrc && \ | |
echo "always-auth=true" >> .npmrc | |
- name: Publish latest package | |
if: steps.cpv.outputs.is-new-version == 'true' | |
run: pnpm -F @snaplet/seed run release:latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_ENV: production | |
- name: Push a new tag on git repo | |
if: steps.cpv.outputs.is-new-version == 'true' | |
uses: Klemensas/action-autotag@stable | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
package_root: "packages/seed" | |
tag_prefix: "v" |