Update actions in CI (#10600)

This commit is contained in:
Álvaro Mondéjar 2024-03-09 17:28:21 +01:00 committed by GitHub
parent 78b2f3fb7c
commit 6dca3fb56b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 31 additions and 61 deletions

View File

@ -35,7 +35,7 @@ jobs:
if: | if: |
steps.match-java.outputs.match == 'true' && steps.match-java.outputs.match == 'true' &&
contains(steps.get-labels.outputs.labels, 'new icon') contains(steps.get-labels.outputs.labels, 'new icon')
uses: actions/github-script@v6 uses: actions/github-script@v7
with: with:
script: | script: |
github.rest.issues.createComment({ github.rest.issues.createComment({

View File

@ -42,16 +42,11 @@ jobs:
# Ensure we are checked out on the develop branch # Ensure we are checked out on the develop branch
ref: develop ref: develop
- name: Use Node.js 20.x - name: Use Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20
- name: Cache dependencies cache: npm
uses: actions/cache@v3 cache-dependency-path: '**/package.json'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Bump version - name: Bump version
run: | run: |
npm version --no-commit-hooks --no-git-tag-version \ npm version --no-commit-hooks --no-git-tag-version \
@ -67,7 +62,7 @@ jobs:
- name: Update SDK Typescript definitions - name: Update SDK Typescript definitions
run: node ./scripts/release/update-sdk-ts-defs.js run: node ./scripts/release/update-sdk-ts-defs.js
- name: Commit version bump - name: Commit version bump
uses: stefanzweifel/git-auto-commit-action@v5.0.0 uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: version bump commit_message: version bump
commit_user_name: 'github-actions[bot]' commit_user_name: 'github-actions[bot]'

View File

@ -12,16 +12,11 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Use Node.js 20.x - name: Use Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20
- name: Cache dependencies cache: npm
uses: actions/cache@v3 cache-dependency-path: '**/package.json'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies - name: Install dependencies
run: npm i run: npm i
- name: Run linters - name: Run linters
@ -38,16 +33,11 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Use Node.js 20.x - name: Use Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20
- name: Cache dependencies cache: npm
uses: actions/cache@v3 cache-dependency-path: '**/package.json'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- id: get-version - id: get-version
uses: ./.github/actions/get-version uses: ./.github/actions/get-version
- name: Install dependencies - name: Install dependencies
@ -59,7 +49,7 @@ jobs:
- name: Build NodeJS package - name: Build NodeJS package
run: npm run build run: npm run build
- name: Deploy to NPM - name: Deploy to NPM
uses: JS-DevTools/npm-publish@v2 uses: JS-DevTools/npm-publish@v3
with: with:
token: ${{ secrets.NPM_TOKEN }} token: ${{ secrets.NPM_TOKEN }}
github: github:
@ -71,7 +61,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Get commit message (for release title and body) - name: Get commit message (for release title and body)
id: commit id: commit
uses: kceb/git-message-action@v2 uses: kceb/git-message-action@v3
- id: get-version - id: get-version
uses: ./.github/actions/get-version uses: ./.github/actions/get-version
- name: Reformat to regular markdown - name: Reformat to regular markdown
@ -92,12 +82,12 @@ jobs:
git tag -a "${tag}" -m "${{ steps.commit.outputs.git-message }}" git tag -a "${tag}" -m "${{ steps.commit.outputs.git-message }}"
git push origin "${tag}" git push origin "${tag}"
- name: Create release - name: Create release
uses: actions/create-release@v1 uses: softprops/action-gh-release@v2
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ steps.get-version.outputs.version }} tag_name: ${{ steps.get-version.outputs.version }}
release_name: ${{ steps.commit.outputs.title }} name: ${{ steps.commit.outputs.title }}
body: ${{ steps.commit.outputs.body }} body: ${{ steps.commit.outputs.body }}
font: font:
name: Trigger simple-icons-font release name: Trigger simple-icons-font release

View File

@ -9,16 +9,11 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Use Node.js 20.x - name: Use Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20
- name: Cache dependencies cache: npm
uses: actions/cache@v3 cache-dependency-path: '**/package.json'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies - name: Install dependencies
run: npm i run: npm i
- name: Build NodeJS package - name: Build NodeJS package
@ -30,16 +25,11 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Use Node.js 20.x - name: Use Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20
- name: Cache dependencies cache: npm
uses: actions/cache@v3 cache-dependency-path: '**/package.json'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies - name: Install dependencies
run: npm i run: npm i
- name: Run linter - name: Run linter
@ -48,7 +38,7 @@ jobs:
# Authorise GitHub API requests for editorconfig-checker # Authorise GitHub API requests for editorconfig-checker
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Detect changed documentation files - name: Detect changed documentation files
uses: dorny/paths-filter@v2 uses: dorny/paths-filter@v3
id: changes id: changes
with: with:
list-files: shell list-files: shell
@ -88,16 +78,11 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Use Node.js 20.x - name: Use Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20
- name: Cache dependencies cache: npm
uses: actions/cache@v3 cache-dependency-path: '**/package.json'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies - name: Install dependencies
run: npm i run: npm i
- name: Run tests - name: Run tests