-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix github release process, distinguishing between release and pre release * Name each github workflow differently * Update scripts, package.json * Remove v check * Remove force * Bump to 3.8.3
- Loading branch information
Showing
6 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Publish beta package to npmjs | ||
on: | ||
release: | ||
types: [ prereleased ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm run check-beta-tag | ||
- run: npm publish --tag beta | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const fs = require('fs'); | ||
const packageJSON = require('../package.json'); | ||
const packageLockJSON = require('../package-lock.json'); | ||
|
||
let tagVersion = process.env.GITHUB_REF_NAME || ''; | ||
console.log('Checking tag:', tagVersion); | ||
|
||
|
||
if (!tagVersion.includes('-beta')) { | ||
console.error('Prelease version should contain a "-beta" suffix'); | ||
process.exit(1); | ||
} | ||
|
||
if (tagVersion !== packageJSON.version) { | ||
console.error('VERSION MISMATCH - version does not match package.json.'); | ||
process.exit(1); | ||
} | ||
if (tagVersion !== packageLockJSON.version) { | ||
console.error('VERSION MISMATCH - version does not match package-lock.json.'); | ||
process.exit(1); | ||
} | ||
console.log('Tag OK.', tagVersion); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const fs = require('fs'); | ||
const packageJSON = require('../package.json'); | ||
const packageLockJSON = require('../package-lock.json'); | ||
|
||
let tagVersion = process.env.GITHUB_REF_NAME || ''; | ||
console.log('Checking tag:', tagVersion); | ||
|
||
|
||
if (tagVersion.includes('-')) { | ||
console.error('Latest tag should not include any suffix:', `-${tagVersion.split('-')[1]}`); | ||
process.exit(1); | ||
} | ||
|
||
if (tagVersion !== packageJSON.version) { | ||
console.error('VERSION MISMATCH - version does not match package.json.'); | ||
process.exit(1); | ||
} | ||
if (tagVersion !== packageLockJSON.version) { | ||
console.error('VERSION MISMATCH - version does not match package-lock.json.'); | ||
process.exit(1); | ||
} | ||
console.log('Tag OK.', tagVersion); |