Skip to content

Commit

Permalink
ci: fix deprecated actions (#276)
Browse files Browse the repository at this point in the history
* ci: actions/checkout@v4
* ci: actions/setup-node@v4
* ci: update actions usage
* ci: remove unused reelase-authors artifact upload
  • Loading branch information
legobeat authored Oct 17, 2024
1 parent 8438343 commit 3faea82
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 32 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,12 @@ jobs:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn cache directory
run: echo "::set-output name=YARN_CACHE_DIR::$(yarn cache dir)"
id: yarn-cache-dir
- name: Get Yarn version
run: echo "::set-output name=YARN_VERSION::$(yarn --version)"
id: yarn-version
- name: Cache yarn dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
key: yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn allow-scripts
- run: yarn build
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,20 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
# This is to guarantee that the most recent tag is fetched.
# This can be configured to a more reasonable value by consumers.
fetch-depth: 0
# We check out the specified branch, which will be used as the base
# branch for all git operations and the release PR.
ref: ${{ github.event.inputs.base-branch }}
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
node-version-file: .nvmrc
- uses: MetaMask/action-create-release-pr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release-type: ${{ github.event.inputs.release-type }}
release-version: ${{ github.event.inputs.release-version }}
artifacts-path: gh-action__release-authors
# Upload the release author artifact for use in subsequent workflows
- uses: actions/upload-artifact@v2
with:
name: release-authors
path: gh-action__release-authors
if-no-files-found: error
10 changes: 4 additions & 6 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ jobs:
startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
# We check out the release pull request's base branch, which will be
# used as the base branch for all git operations.
ref: ${{ github.event.pull_request.base.ref }}
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
node-version-file: .nvmrc
cache: yarn
- uses: MetaMask/action-publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3faea82

Please sign in to comment.