Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated GitHub actions #2249

Merged
merged 6 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 33 additions & 31 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --immutable
- name: Cache "@metamask/snaps-execution-environments" build
id: cache-snaps-execution-environments-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/snaps-execution-environments/dist/browserify
Expand All @@ -48,9 +48,9 @@ jobs:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Build types
run: yarn build:types
- name: Cache build files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/*/dist
Expand All @@ -78,23 +78,23 @@ jobs:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
- run: yarn --immutable --immutable-cache
- name: Restore "@metamask/snaps-execution-environments" build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/snaps-execution-environments/dist/browserify
key: snaps-execution-environments-build-${{ runner.os }}-18.x-${{ github.sha }}
fail-on-cache-miss: true
- name: Cache Webpack vendor
id: cache-webpack-vendor
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/snaps-simulator/vendor
Expand All @@ -106,7 +106,7 @@ jobs:
run: yarn workspace @metamask/snaps-simulator run build:webpack
- name: Cache "@metamask/snaps-simulator" build
id: cache-e2e-simulator-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/snaps-simulator/dist/webpack
Expand All @@ -124,9 +124,9 @@ jobs:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
Expand All @@ -146,9 +146,9 @@ jobs:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
Expand All @@ -172,9 +172,9 @@ jobs:
matrix:
package-name: ${{ fromJson(needs.prepare.outputs.all-workspace-package-names) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
Expand All @@ -198,14 +198,14 @@ jobs:
node-version: [18.x, 20.x]
package-name: ${{ fromJson(needs.prepare.outputs.test-workspace-package-names) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Restore "@metamask/snaps-execution-environments" build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/snaps-execution-environments/dist/browserify
Expand All @@ -220,12 +220,13 @@ jobs:
run: |
echo "stub" >> stub
echo "coverage-folder=$(yarn workspaces list --json | grep ${{ matrix.package-name }} | jq -r '.location')/coverage" >> "$GITHUB_OUTPUT"
echo "artifact-name=$(echo ${{ matrix.package-name }} | sed 's:.*/::')" >> "$GITHUB_OUTPUT"
shell: bash
- name: Upload coverage artifact
if: ${{ matrix.node-version == '18.x' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage
name: coverage-${{ steps.get-coverage-folder.outputs.artifact-name }}
path: |
stub
${{ steps.get-coverage-folder.outputs.coverage-folder }}/**/coverage-final.json
Expand All @@ -244,11 +245,12 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download coverage artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage
pattern: coverage-*
merge-multiple: true
- name: Upload coverage results
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
with:
Expand All @@ -266,21 +268,21 @@ jobs:
node-version: [18.x, 20.x]
package-name: ${{ fromJson(needs.prepare.outputs.e2e-workspace-package-names) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Restore "@metamask/snaps-execution-environments" build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/snaps-execution-environments/dist/browserify
key: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Restore build files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
packages/*/dist
Expand All @@ -307,9 +309,9 @@ jobs:
matrix:
os: [macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Check workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download actionlint
id: download-actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.25
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- name: Ensure `destination_dir` is not empty
if: ${{ inputs.destination_dir == '' }}
run: exit 1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: yarn --immutable
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
- name: Ensure `publish_dir` is not empty
if: ${{ inputs.publish_dir == '' }}
run: exit 1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: yarn --immutable
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
outputs:
IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Determine whether this PR is from a fork
id: is-fork
run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT"
Expand All @@ -29,14 +29,14 @@ jobs:
if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Checkout pull request
run: gh pr checkout "${PR_NUMBER}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
outputs:
tag: ${{ steps.get-release-tag.outputs.tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: yarn install --immutable
Expand All @@ -53,11 +53,11 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: MetaMask/action-publish-release@v3
Expand All @@ -69,7 +69,7 @@ jobs:
- run: |
yarn install --immutable
yarn build
- uses: actions/cache@v3
- uses: actions/cache@v4
id: restore-build
with:
path: |
Expand All @@ -82,10 +82,10 @@ jobs:
runs-on: ubuntu-latest
needs: publish-release
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: restore-build
with:
path: |
Expand All @@ -109,10 +109,10 @@ jobs:
- npm-publish-dry-run
- get-release-tag
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: restore-build
with:
path: |
Expand All @@ -133,7 +133,7 @@ jobs:
outputs:
IS_ENVIRONMENT_RELEASE: ${{ steps.is-environment-release.outputs.IS_ENVIRONMENT_RELEASE }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 2
Expand All @@ -153,7 +153,7 @@ jobs:
outputs:
version: ${{ steps.version.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- id: version
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
IS_TEST_SNAPS_RELEASE: ${{ steps.set-output.outputs.IS_TEST_SNAPS_RELEASE }}
TEST_SNAPS_VERSION: ${{ steps.set-output.outputs.TEST_SNAPS_VERSION }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 2
Expand Down Expand Up @@ -269,7 +269,7 @@ jobs:
IS_SIMULATOR_RELEASE: ${{ steps.set-output.outputs.IS_SIMULATOR_RELEASE }}
SIMULATOR_VERSION: ${{ steps.set-output.outputs.SIMULATOR_VERSION }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 2
Expand Down
Loading
Loading