Skip to content

Commit

Permalink
Upgrade deprecated actions (#4193)
Browse files Browse the repository at this point in the history
In response to some of our actions starting to fail deprecate all of the
actions that don't work anymore due to using Node 10/12

- [Looks like upload artefact is safe to
upgrade](https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md)
we don't seem to overwrite files
- [Same for
download](https://github.com/actions/download-artifact/blob/main/docs/MIGRATION.md)
  • Loading branch information
JoviDeCroock authored Sep 14, 2024
1 parent 9a91e33 commit 0517368
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
run: npm run build:npm

- name: Upload npmDist package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: npmDist
path: ./npmDist
Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
run: npm run build:deno

- name: Upload denoDist package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: denoDist
path: ./denoDist
Expand All @@ -256,7 +256,7 @@ jobs:
run: npm run build:website

- name: Upload denoDist package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: websiteDist
path: ./websiteDist
8 changes: 4 additions & 4 deletions .github/workflows/cmd-publish-pr-on-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: npm run build:npm

- name: Upload npmDist package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: npmDist
path: ./npmDist
Expand All @@ -55,15 +55,15 @@ jobs:
# 'registry-url' is required for 'npm publish'
registry-url: 'https://registry.npmjs.org'

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: npmDist
path: npmDist

- name: Modify NPM package to be canary release
env:
PULL_REQUEST_JSON: ${{ inputs.pullRequestJSON }}
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_CANARY_PR_PUBLISH_TOKEN }}

- name: Upload replyMessage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: replyMessage
path: ./replyMessage.txt
2 changes: 1 addition & 1 deletion .github/workflows/cmd-run-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
EOF
- name: Upload replyMessage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: replyMessage
path: ./replyMessage.txt
2 changes: 1 addition & 1 deletion .github/workflows/deploy-artifact-as-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Remove existing files first
run: git rm -r .

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/github-actions-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
WORKFLOW_ID: ${{github.event.workflow_run.id}}

- name: Add comment on PR
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand All @@ -58,7 +58,7 @@ jobs:
cmd: ${{ steps.parse-cmd.outputs.cmd }}
pullRequestJSON: ${{ steps.parse-cmd.outputs.pullRequestJSON }}
steps:
- uses: actions/github-script@v5
- uses: actions/github-script@v7
with:
script: |
github.rest.reactions.createForIssueComment({
Expand All @@ -68,7 +68,7 @@ jobs:
});
- id: parse-cmd
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const comment = context.payload.comment.body;
Expand Down Expand Up @@ -102,12 +102,12 @@ jobs:
if: needs.accept-cmd.result != 'skipped' && always()
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: replyMessage

- if: failure()
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand All @@ -131,7 +131,7 @@ jobs:
RUN_URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}

- if: always()
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: 'node resources/diff-npm-package.js BASE HEAD'

- name: Upload generated report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: npm-dist-diff.html
path: ./npm-dist-diff.html
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Upload event.json
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: event.json
path: ${{ github.event_path }}

0 comments on commit 0517368

Please sign in to comment.