Skip to content

Commit

Permalink
Publish a pre-release on every push to next (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
JAForbes authored Nov 1, 2021
1 parent 48f3a99 commit ab137dc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
name: Setup NPM Auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
name: Publish
# The following will publish the release to npm
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc # prr:comment
name: Setup NPM Auth # prr:comment
env: # prr:comment
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # prr:comment
- run: npm publish # prr:comment
name: Publish # prr:comment
9 changes: 6 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- run: npm version --no-verify --no-commit-hooks --no-git-tag-version $(node bin.js infer-version)
- run: npm version --no-verify --no-commit-hooks --no-git-tag-version prerelease --preid=next
- run: cat package.json
# The following publishes a pre-release version every time `next` is updated
- run: npm version --no-verify --no-commit-hooks --no-git-tag-version $(node bin.js infer-version) # prr:comment
- run: npm version --no-verify --no-commit-hooks --no-git-tag-version prerelease --preid=next # prr:comment
- run: npm publish --tag=next # prr:comment
env: # prr:comment
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # prr:comment
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ npx pr-release pr --source v2-next --target v2
```
pr-release
version: 0.12.0
version: 0.13.1
pr-release subcommand --options
Expand Down
13 changes: 7 additions & 6 deletions templates/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
name: Setup NPM Auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
name: Publish
# The following will publish the release to npm
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc # prr:comment
name: Setup NPM Auth # prr:comment
env: # prr:comment
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # prr:comment
- run: npm publish # prr:comment
name: Publish # prr:comment
9 changes: 6 additions & 3 deletions templates/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- run: npm version --no-verify --no-commit-hooks --no-git-tag-version $(npx pr-release infer-version)
- run: npm version --no-verify --no-commit-hooks --no-git-tag-version prerelease --preid=$source
- run: cat package.json
# The following publishes a pre-release version every time `$source` is updated
- run: npm version --no-verify --no-commit-hooks --no-git-tag-version $(npx pr-release infer-version) # prr:comment
- run: npm version --no-verify --no-commit-hooks --no-git-tag-version prerelease --preid=$source # prr:comment
- run: npm publish --tag=$source # prr:comment
env: # prr:comment
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # prr:comment

0 comments on commit ab137dc

Please sign in to comment.