Can the Node.js 12 actions are deprecated warning be resolved during the build?
Updating the version of the modules used in the YAML will resolve the warning.
The YAML file sample displayed on [KurocoFront]->[Github] has been updated to a version that does not show the warning, but depending on the timing of creating the YAML file, the following warning may be displayed.
If the warning is displayed, update the YAML file as follows to resolve the warning.
How to Fix
Modify the following sections to @v3
respectively.
actions/checkout@v2
actions/setup-node@v2
actions/upload-artifact@v2
Locations to Modify
There are a total of 6 places, with 2 places each.
- name: Checkout Repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
ref: ${{ steps.get_branch.outputs.branch }}
- name: Use Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
# - name: Zip artifact for upload
# run: cd dist && zip ../dist.zip . -r
- name: Archive Production Artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: ${{ steps.get_branch.outputs.sha }}-${{ github.run_id }}
path: dist
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Use Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
# - name: Zip artifact for upload
# run: cd dist && zip ../dist.zip . -r
- name: Archive Production Artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}-${{ github.run_id }}
path: dist
Related Documents
Support
If you have any other questions, please contact us or check out Our Slack Community.