style(yaml): apply yaml linter to workflow files
This commit is contained in:
2
.github/release.yml
vendored
2
.github/release.yml
vendored
@@ -13,4 +13,4 @@ changelog:
|
|||||||
- enhancement
|
- enhancement
|
||||||
- title: Other Changes
|
- title: Other Changes
|
||||||
labels:
|
labels:
|
||||||
- "*"
|
- '*'
|
||||||
|
|||||||
2
.github/workflows/daily.yml
vendored
2
.github/workflows/daily.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
name: npm audit
|
name: npm audit
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, macos-latest ]
|
os: [ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
40
.github/workflows/git-tag.yml
vendored
40
.github/workflows/git-tag.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "git tag major version"
|
name: 'git tag major version'
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
@@ -8,24 +8,24 @@ jobs:
|
|||||||
tag-major-version:
|
tag-major-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check out repository code
|
- name: check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: git config
|
- name: git config
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "${GITHUB_ACTOR}"
|
git config --global user.name "${GITHUB_ACTOR}"
|
||||||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
- 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}
|
||||||
# Extract major version from release tag (e.g., v3.0.0 -> v3)
|
# Extract major version from release tag (e.g., v3.0.0 -> v3)
|
||||||
MAJOR_VERSION=$(echo ${{ github.event.release.tag_name }} | grep -o "^v[0-9]*")
|
MAJOR_VERSION=$(echo ${{ github.event.release.tag_name }} | grep -o "^v[0-9]*")
|
||||||
echo "Tagging with major version: ${MAJOR_VERSION}"
|
echo "Tagging with major version: ${MAJOR_VERSION}"
|
||||||
|
|
||||||
# Delete the major version tag if it exists
|
# Delete the major version tag if it exists
|
||||||
git push origin -d ${MAJOR_VERSION} || true
|
git push origin -d ${MAJOR_VERSION} || true
|
||||||
|
|
||||||
# Create and push the new major version tag
|
# Create and push the new major version tag
|
||||||
git tag ${MAJOR_VERSION} ${GITHUB_SHA}
|
git tag ${MAJOR_VERSION} ${GITHUB_SHA}
|
||||||
git push origin ${MAJOR_VERSION}
|
git push origin ${MAJOR_VERSION}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
70
.github/workflows/package-version.yml
vendored
70
.github/workflows/package-version.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "update package version"
|
name: 'update package version'
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
@@ -9,41 +9,41 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event.label.name == 'release minor' }}
|
if: ${{ github.event.label.name == 'release minor' }}
|
||||||
steps:
|
steps:
|
||||||
- name: check out repository code
|
- name: check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
- name: git config
|
- name: git config
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "${GITHUB_ACTOR}"
|
git config --global user.name "${GITHUB_ACTOR}"
|
||||||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
- name: increment minor version
|
- name: increment minor version
|
||||||
run: |
|
run: |
|
||||||
npm version minor
|
npm version minor
|
||||||
- name: git push
|
- name: git push
|
||||||
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 HEAD:${{ github.head_ref }}
|
git push origin HEAD:${{ github.head_ref }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
patch:
|
patch:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event.label.name == 'release patch' }}
|
if: ${{ github.event.label.name == 'release patch' }}
|
||||||
steps:
|
steps:
|
||||||
- name: check out repository code
|
- name: check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
- name: git config
|
- name: git config
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "${GITHUB_ACTOR}"
|
git config --global user.name "${GITHUB_ACTOR}"
|
||||||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
- name: increment patch version
|
- name: increment patch version
|
||||||
run: |
|
run: |
|
||||||
npm version patch
|
npm version patch
|
||||||
- name: git push
|
- name: git push
|
||||||
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 HEAD:${{ github.head_ref }}
|
git push origin HEAD:${{ github.head_ref }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
88
.github/workflows/test.yml
vendored
88
.github/workflows/test.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "build-test"
|
name: 'build-test'
|
||||||
on: # rebuild any PRs and main branch changes
|
on: # rebuild any PRs and main branch changes
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
@@ -10,20 +10,20 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node: [20]
|
node: [20]
|
||||||
os: [ ubuntu-latest, macos-latest ]
|
os: [ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- name: Install dependencies and run tests
|
- name: Install dependencies and run tests
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npm run test:coverage
|
npm run test:coverage
|
||||||
- uses: coverallsapp/github-action@master
|
- uses: coverallsapp/github-action@master
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
build-on-windows:
|
build-on-windows:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -31,44 +31,44 @@ jobs:
|
|||||||
node: [20]
|
node: [20]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- name: Install dependencies and run tests
|
- name: Install dependencies and run tests
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
test: # make sure the action works on a clean machine without building
|
test: # make sure the action works on a clean machine without building
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node: [20]
|
node: [20]
|
||||||
os: [ ubuntu-latest, macos-latest ]
|
os: [ubuntu-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- name: Run npm audit action
|
- name: Run npm audit action
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue_title: npm audit run by test job
|
issue_title: npm audit run by test job
|
||||||
create_issues: false
|
create_issues: false
|
||||||
production_flag: true
|
production_flag: true
|
||||||
- name: Run npm audit action in testdata workdir
|
- name: Run npm audit action in testdata workdir
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
working_directory: __tests__/testdata/workdir/
|
working_directory: __tests__/testdata/workdir/
|
||||||
create_issues: false
|
create_issues: false
|
||||||
production_flag: true
|
production_flag: true
|
||||||
|
|
||||||
# test-on-windows:
|
# test-on-windows:
|
||||||
# strategy:
|
# strategy:
|
||||||
|
|||||||
Reference in New Issue
Block a user