V2.1.0 (#1) #1
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
# 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: | |
- master | |
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 }}" |