Skip to content

Commit

Permalink
chore: release 25.1.0-rc.2
Browse files Browse the repository at this point in the history
Release-As: 25.1.0-rc.2
  • Loading branch information
NathanFlurry committed Feb 4, 2025
1 parent 3c2f4e4 commit 239e43a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- run: corepack enable

- name: Setup
env:
# Required to authenticate with Git
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# Configure Git
git config user.name "github-actions[bot]"
Expand All @@ -56,12 +58,13 @@ jobs:
curl -fsSL https://deno.land/x/install/install.sh | sh
export PATH=$HOME/.deno/bin:$PATH
# Authenticate NPM
yarn config set 'npmRegistries["//registry.npmjs.org"].npmAuthToken' ${{ secrets.NPM_TOKEN }}
yarn config set 'npmScopes["@rivet-gg"].npmPublishRegistry' https://registry.npmjs.org/
# Authenticate with Registry
cat << EOF > ~/.npmrc
//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}
EOF
# Install dependencies
yarn install
yarn install --immutable
if [ "${{ inputs.latest }}" = "true" ]; then
./scripts/release/main.ts --version "${{ github.event.inputs.version }}" --setupCi
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ graphite-modify:
[group('github')]
release-latest VERSION:
./scripts/release/main.ts --setupLocal --version {{ VERSION }}
gh workflow run .github/workflows/release.yaml -f version={{ VERSION }} -f latest=true --ref $(git rev-parse HEAD)
gh workflow run .github/workflows/release.yaml -f version={{ VERSION }} -f latest=true --ref $(git branch --show-current)
echo 'Once workflow is complete, manually merge Release Please'

[group('github')]
release-nolatest VERSION:
./scripts/release/main.ts --setupLocal --version {{ VERSION }} --noLatest
gh workflow run .github/workflows/release.yaml -f version={{ VERSION }} -f latest=false --ref $(git rev-parse HEAD)
gh workflow run .github/workflows/release.yaml -f version={{ VERSION }} -f latest=false --ref $(git branch --show-current)
echo 'Once workflow is complete, manually merge Release Please'

2 changes: 1 addition & 1 deletion scripts/release/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import $ from "dax";
export async function validateGit(_opts: ReleaseOpts) {
// Validate there's no uncommitted changes
const status = await $`git status --porcelain`.text();
if (status) {
if (status.trim().length > 0) {
throw new Error(
"There are uncommitted changes. Please commit or stash them.",
);
Expand Down
3 changes: 2 additions & 1 deletion scripts/release/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ async function main() {

assertEquals(opts.commit.length, 7, "must use 8 char short commit");

if (!args.noValidateGit) {
if (!args.noValidateGit && !args.setupCi) {
// HACK: Skip setupCi because for some reason there's changes in the setup step but only in GitHub Actions
await validateGit(opts);
}

Expand Down

0 comments on commit 239e43a

Please sign in to comment.