Skip to content

chore(repo): Renamed to use main as default branch #2

chore(repo): Renamed to use main as default branch

chore(repo): Renamed to use main as default branch #2

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: Versions Checker Package Publish
on:
push:
branches:
- main
permissions:
contents: write
actions: write
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup node 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Check package version
id: cpv
uses: PostHog/check-package-version@v2
- name: Install dependencies
run: npm ci
- name: Build App
run: npm run build
- name: Publish new version
if: steps.cpv.outputs.is-new-version == 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Create Tag
uses: piszmog/create-tag@v1
if: steps.cpv.outputs.is-new-version == 'true'
with:
version: "v${{ steps.cpv.outputs.committed-version }}"
message: "Release v${{ steps.cpv.outputs.committed-version }}"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: dev-build-deploy/release-me@v0
if: steps.cpv.outputs.is-new-version == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
prefix: v
version: "v${{ steps.cpv.outputs.committed-version }}"