Skip to content

Merge pull request #37 from Daniel-Ric/dependabot/npm_and_yarn/produc… #25

Merge pull request #37 from Daniel-Ric/dependabot/npm_and_yarn/produc…

Merge pull request #37 from Daniel-Ric/dependabot/npm_and_yarn/produc… #25

name: Automated Version Tags
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
concurrency:
group: automated-version-tags-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
validate:
if: >-
${{
github.event_name == 'workflow_dispatch' ||
(
github.actor != 'github-actions[bot]' &&
github.actor != 'dependabot[bot]' &&
github.event.head_commit.author.username != 'dependabot[bot]' &&
!contains(github.event.head_commit.message, '[skip release]') &&
!contains(github.event.head_commit.message, 'dependabot/')
)
}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: "22"
cache: "npm"
- name: Install from lockfile
run: npm ci --no-audit --no-fund --loglevel=error
- name: Tests
run: npm test
release:
if: >-
${{
github.event_name == 'workflow_dispatch' ||
(
github.actor != 'github-actions[bot]' &&
github.actor != 'dependabot[bot]' &&
github.event.head_commit.author.username != 'dependabot[bot]' &&
!contains(github.event.head_commit.message, '[skip release]') &&
!contains(github.event.head_commit.message, 'dependabot/')
)
}}
needs: validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: "22"
- name: Create version tags, releases, and changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_EVENT_PATH: ${{ github.event_path }}
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF_NAME: ${{ github.ref_name }}
run: node .github/scripts/create-version-release.js