mirror of
https://github.com/actions/javascript-action.git
synced 2026-01-13 09:21:30 +08:00
Add basic release management
This commit is contained in:
41
.github/workflows/version-check.yml
vendored
Normal file
41
.github/workflows/version-check.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# This workflow checks the version of the action that will be published by the
|
||||
# current pull request. If the version has already been published, the workflow
|
||||
# fails in order to prevent PRs from being merged until the version has been
|
||||
# incremented in the package.json manifest file.
|
||||
name: Version Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
MANIFEST_PATH: package.json
|
||||
|
||||
permissions:
|
||||
checks: write
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
check-version:
|
||||
name: Version Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Skips Dependabot PRs
|
||||
if: ${{ startsWith(github.head_ref, 'dependabot/') == false }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Check Version
|
||||
id: check-version
|
||||
uses: issue-ops/semver@v2
|
||||
with:
|
||||
check-only: true
|
||||
manifest-path: ${{ env.MANIFEST_PATH }}
|
||||
Reference in New Issue
Block a user