Skip to content

Commit

Permalink
Upgrade the workflows of the github-actions package to use Node.js …
Browse files Browse the repository at this point in the history
…v20.
  • Loading branch information
eason9487 committed Apr 22, 2024
1 parent 85280ce commit 3a2be27
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/github-actions-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
if: ${{ github.event.pull_request.head.ref == 'release/actions' && github.event.review.state == 'approved' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const workspace = '${{ github.workspace }}';
Expand All @@ -27,7 +27,7 @@ jobs:
} );
- name: Upload release artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release
path: /tmp/release.json
4 changes: 2 additions & 2 deletions .github/workflows/github-actions-create-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare node
uses: ./packages/github-actions/actions/prepare-node
with:
node-version: 14
node-version: 20
cache-dependency-path: ./packages/github-actions/package-lock.json
install-deps: "no"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-delete-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.event.ref_type == 'branch'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: trunk

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/github-actions-prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check created release branch
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
if ( ! context.payload.created ) {
Expand All @@ -27,12 +27,12 @@ jobs:
needs: CheckCreatedBranch
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Prepare node
uses: ./packages/github-actions/actions/prepare-node
with:
node-version: 14
node-version: 20
cache-dependency-path: ./packages/github-actions/package-lock.json
install-deps: "no"

Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
jq ".version=\"${NEXT_VER}\"" package.json > package.json.tmp
mv package.json.tmp package.json
jq ".version=\"${NEXT_VER}\"" package-lock.json > package-lock.json.tmp
jq ".version=\"${NEXT_VER}\" | .packages.\"\".version=\"${NEXT_VER}\"" package-lock.json > package-lock.json.tmp
mv package-lock.json.tmp package-lock.json
git config user.name github-actions[bot]
Expand All @@ -85,7 +85,7 @@ jobs:
git push
- name: Create a pull request for release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const workspace = '${{ github.workspace }}';
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/github-actions-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
release: ${{ steps.set-result.outputs.release }}
steps:
- name: Check tag name or workflow_run conclusion
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { payload, eventName } = context;
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Get release artifact
id: set-result
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const fs = require( 'fs' );
Expand Down Expand Up @@ -77,14 +77,14 @@ jobs:
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ steps.resolve-tag.outputs.tag_name }}

- name: Prepare node
uses: ./packages/github-actions/actions/prepare-node
with:
node-version: 14
node-version: 20
cache-dependency-path: ./packages/github-actions/package-lock.json
install-deps: "no"

Expand Down

0 comments on commit 3a2be27

Please sign in to comment.