Skip to content

Commit

Permalink
chore: setup releases for GA (#805)
Browse files Browse the repository at this point in the history
This modifies how we do releases -
- The changesets flow will now publish to latest
- Every commit will now be published as beta instead of alpha
  • Loading branch information
threepointone authored May 3, 2022
1 parent da12cc5 commit 3a4ddea
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/prereleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
prerelease:
if: ${{ github.repository_owner == 'cloudflare' }}
name: Build & Publish an alpha release to NPM
name: Build & Publish a beta release to NPM
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -39,14 +39,14 @@ jobs:
- name: Check for errors
run: npm run check

- name: Publish Alpha to NPM
run: npm publish --tag alpha
- name: Publish Beta to NPM
run: npm publish --tag beta
env:
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
working-directory: packages/wrangler

- name: Get Package Version
run: echo "WRANGLER_VERSION=$(npm view wrangler@alpha version)" >> $GITHUB_ENV
run: echo "WRANGLER_VERSION=$(npm view wrangler@beta version)" >> $GITHUB_ENV
working-directory: packages/wrangler
# The Sourcemap rewrite script is necessary due to how Sentry handles Events, Sourcemaps and sourcemapping URLs, all of which need to reference each other.
# The script will rewrite the sourcemap URLs to point to the correct location of the sourcemap and what the Event is being processed (with RewriteFrames)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: changesets/action@v1
with:
version: node .github/changeset-version.js
publish: npx changeset publish --tag beta
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Further, we will NOT do a general release until we are both feature complete, an
# Make a javascript file
$ echo "export default { fetch() { return new Response('hello world') } }" > index.js
# try it out
$ npx wrangler@beta dev index.js
$ npx wrangler dev index.js
# and then publish it
$ npx wrangler@beta publish index.js --name my-worker
$ npx wrangler publish index.js --name my-worker
# visit https://my-worker.<your workers subdomain>.workers.dev
```

## Installation:

```bash
$ npm install wrangler@beta --save-dev
$ npm install wrangler --save-dev
```

## Commands
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@
For example:

```bash
npx wrangler@beta pages dev -- npm run dev
npx wrangler pages dev -- npm run dev
```

Previously the args after `--` were being dropped.
Expand Down
6 changes: 3 additions & 3 deletions packages/wrangler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Further, we will NOT do a general release until we are both feature complete, an
# Make a javascript file
$ echo "export default { fetch() { return new Response('hello world') } }" > index.js
# try it out
$ npx wrangler@beta dev index.js
$ npx wrangler dev index.js
# and then publish it
$ npx wrangler@beta publish index.js --name my-worker
$ npx wrangler publish index.js --name my-worker
# visit https://my-worker.<your workers subdomain>.workers.dev
```

## Installation:

```bash
$ npm install wrangler@beta
$ npm install wrangler --save-dev
```

## Commands
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/update-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function updateCheck(): Promise<string> {
try {
// default cache for update check is 1 day
update = await checkForUpdate(pkg, {
distTag: pkg.version.startsWith("0.0.0") ? "alpha" : "beta", // TODO: change this after https://github.com/cloudflare/wrangler2/pull/805 lands
distTag: pkg.version.startsWith("0.0.0") ? "beta" : "latest",
});
} catch (err) {
// ignore error
Expand Down

0 comments on commit 3a4ddea

Please sign in to comment.