Skip to content

Merge pull request #511 from Crown-Commercial-Service/dependabot/npm_… #325

Merge pull request #511 from Crown-Commercial-Service/dependabot/npm_…

Merge pull request #511 from Crown-Commercial-Service/dependabot/npm_… #325

Workflow file for this run

name: Create a GitHub release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
- name: Get package version
id: package_version
run: echo "npm=$(npm run version --silent)" >> $GITHUB_OUTPUT
- name: Check if version tag already exists
id: version_tag
uses: mukunku/tag-exists-action@bdad1eaa119ce71b150b952c97351c75025c06a9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ steps.package_version.outputs.npm }}
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.package_version.outputs.npm }}
generate_release_notes: true
if: steps.version_tag.outputs.exists == 'false'