Merge pull request #235 from oke-py/feature/update-to-v3

feat: update references from v2 to v3 for release v3.0.0
This commit is contained in:
Naoki Oketani
2025-05-03 22:57:01 +09:00
committed by GitHub
5 changed files with 19 additions and 12 deletions

View File

@@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: install dependencies - name: install dependencies
run: npm ci run: npm ci
- uses: oke-py/npm-audit-action@v2 - uses: oke-py/npm-audit-action@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
issue_assignees: oke-py issue_assignees: oke-py
@@ -34,7 +34,7 @@ jobs:
npm-windows-upgrade --npm-version latest npm-windows-upgrade --npm-version latest
- name: install dependencies - name: install dependencies
run: npm ci run: npm ci
- uses: oke-py/npm-audit-action@v2 - uses: oke-py/npm-audit-action@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
issue_assignees: oke-py issue_assignees: oke-py

View File

@@ -1,11 +1,11 @@
name: "git tag v2" name: "git tag major version"
on: on:
release: release:
types: types:
- published - published
jobs: jobs:
v2: tag-major-version:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: check out repository code - name: check out repository code
@@ -17,8 +17,15 @@ jobs:
- name: git tag - name: git tag
run: | run: |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git push origin -d v2 # Extract major version from release tag (e.g., v3.0.0 -> v3)
git tag v2 ${GITHUB_SHA} MAJOR_VERSION=$(echo ${{ github.event.release.tag_name }} | grep -o "^v[0-9]*")
git push origin v2 echo "Tagging with major version: ${MAJOR_VERSION}"
# Delete the major version tag if it exists
git push origin -d ${MAJOR_VERSION} || true
# Create and push the new major version tag
git tag ${MAJOR_VERSION} ${GITHUB_SHA}
git push origin ${MAJOR_VERSION}
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -61,10 +61,10 @@ jobs:
name: npm audit name: npm audit
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: install dependencies - name: install dependencies
run: npm ci run: npm ci
- uses: oke-py/npm-audit-action@v2 - uses: oke-py/npm-audit-action@v3
with: with:
audit_level: moderate audit_level: moderate
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "npm-audit-action", "name": "npm-audit-action",
"version": "2.4.4", "version": "3.0.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "npm-audit-action", "name": "npm-audit-action",
"version": "2.4.4", "version": "3.0.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^1.11.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "npm-audit-action", "name": "npm-audit-action",
"version": "2.4.4", "version": "3.0.0",
"private": true, "private": true,
"description": "GitHub Action to run `npm audit`", "description": "GitHub Action to run `npm audit`",
"main": "lib/main.js", "main": "lib/main.js",