Skip to content

Version in PR, as main is protected #11

Version in PR, as main is protected

Version in PR, as main is protected #11

Workflow file for this run

name: 'NPM SemVer version'
on:
pull_request:
types: [ labeled, unlabeled, opened, reopened, synchronize ]
jobs:
version:
steps:

Check failure on line 8 in .github/workflows/semver-check.yml

View workflow run for this annotation

GitHub Actions / NPM SemVer version

Invalid workflow file

The workflow is not valid. .github/workflows/semver-check.yml (Line: 8, Col: 5): Required property is missing: runs-on
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'
scope: '@ukhomeoffice'
- name: Calculate semver value
id: calculate
uses: UKHomeOffice/sas-github-workflows/.github/actions/calculate-semver-value@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_to_highest: ${{ github.base_ref == 'main' }}
- name: Bump release version
run: |
npm version --no-git-tag ${{ steps.calculate.outputs.version }}
shell: bash
- name: Configure git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git remote set-url origin https://${{ secrets.AUTH_TOKEN }}@github.com/UKHomeOffice/react-components.git
shell: bash
- name: Commit version
run: |
git add "package.json"
git add "package-lock.json"
git commit -m "npm version ${{ steps.calculate.outputs.version }}"
git push --force