Skip to content

Commit

Permalink
fix(ci): fix building toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Feb 3, 2025
1 parent 537f3d9 commit 447bd52
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,11 @@ jobs:
with:
lfs: 'true'

- run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install dependencies
run: yarn install
- run: corepack enable

- name: Setup
env:
Expand All @@ -64,6 +60,9 @@ jobs:
yarn config set 'npmRegistries["//registry.npmjs.org"].npmAuthToken' ${{ secrets.NPM_TOKEN }}
yarn config set 'npmScopes["@rivet-gg"].npmPublishRegistry' https://registry.npmjs.org/
# Install dependencies
yarn install
if [ "${{ inputs.latest }}" = "true" ]; then
./scripts/release/main.ts --version "${{ github.event.inputs.version }}" --setup
else
Expand Down Expand Up @@ -94,18 +93,19 @@ jobs:
image: rust:1.82.0
steps:
- uses: actions/checkout@v4
with:
lfs: 'true'

- run: corepack enable
# Required for running in Docker
- name: Git LFS Pull
run: |
apt-get update
apt-get install git-lfs
git lfs pull
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install dependencies (TEMP)
run: yarn install && yarn build --filter @rivet-gg/hub
- run: corepack enable

- name: Build
env:
Expand All @@ -124,6 +124,9 @@ jobs:

# Expose token for pulling GH artifacts
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Pull via Git CLI to improve reliability in CI
ENV CARGO_NET_GIT_FETCH_WITH_CLI: "true"
run: |
# Install required components for each platform
apt-get update
Expand Down Expand Up @@ -228,18 +231,19 @@ jobs:
uses: douglascamata/setup-docker-macos-action@v1-alpha

- uses: actions/checkout@v4
with:
lfs: 'true'

- run: corepack enable
# Required for running in Docker
- name: Git LFS Pull
run: |
apt-get update
apt-get install git-lfs
git lfs pull
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install dependencies (TEMP)
run: yarn install && yarn build --filter @rivet-gg/hub
- run: corepack enable

- name: Set outputs
id: vars
Expand Down
3 changes: 3 additions & 0 deletions docker/universal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ RUN apt-get update -y && \
# Disable interactive prompt
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0

# Pull via Git CLI to improve reliability in CI
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

WORKDIR /app

COPY . .
Expand Down
6 changes: 1 addition & 5 deletions scripts/release/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ export async function publishSdk(opts: ReleaseOpts) {
// Publish
if (pkg.npm) {
$.logStep("Publishing to NPM", `${pkg.name}@${opts.version}`);
try {
await $`yarn npm publish --new-version ${opts.version} --no-git-tag-version`.cwd(pkg.path);
} catch {
await $`yarn npm publish --access public`.cwd(pkg.path);
}
await $`yarn npm publish --access public`.cwd(pkg.path);
}

if (pkg.jsr) {
Expand Down

0 comments on commit 447bd52

Please sign in to comment.