Skip to content

Commit

Permalink
✏️ progress: Factor out meteor-actions/setup-node.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Mar 28, 2024
1 parent 539128f commit 51e340d
Showing 1 changed file with 2 additions and 34 deletions.
36 changes: 2 additions & 34 deletions .github/workflows/ci:build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,42 +86,10 @@ jobs:
name: artifacts
path: artifacts

- uses: actions/setup-node@v4
id: setup-node
- name: Set up Node.js 💾
uses: meteor-actions/setup-node@v1
with:
node-version: ${{ needs.build.outputs.node-version }}
continue-on-error: true

- name: Install nvm
if: ${{ steps.setup-node.outcome != 'success' }}
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="${HOME}/.nvm"
echo "NVM_DIR=${NVM_DIR}" >> "$GITHUB_ENV"
- name: Install Meteor-specific Node version via nvm
if: ${{ steps.setup-node.outcome != 'success' }}
env:
ARCH: ${{ matrix.architecture }}
NODE_VERSION: ${{ needs.build.outputs.node-version }}
NVM_DIR: ${{ env.NVM_DIR }}
run: |
export NODE_INSTALL_PATH="${NVM_DIR}/versions/node/v${NODE_VERSION}"
curl "https://static.meteor.com/dev-bundle-node-os/v${NODE_VERSION}/node-v${NODE_VERSION}-${ARCH}.tar.gz" | tar xzf - -C /tmp/
mkdir -p "${NODE_INSTALL_PATH}"
rm -r "${NODE_INSTALL_PATH}"
mv "/tmp/node-v${NODE_VERSION}-${ARCH}" "${NODE_INSTALL_PATH}"
- name: Use Meteor-specific Node version via nvm
if: ${{ steps.setup-node.outcome != 'success' }}
env:
NODE_VERSION: ${{ needs.build.outputs.node-version }}
NVM_DIR: ${{ env.NVM_DIR }}
run: |
source "${NVM_DIR}/nvm.sh"
nvm use "${NODE_VERSION}"
export NODE_PATH="$(dirname $(nvm which $(node --version)))"
echo "${NODE_PATH}" >> "$GITHUB_PATH"

- name: Inflate build 🧥
run: |
Expand Down

0 comments on commit 51e340d

Please sign in to comment.