Skip to content

Commit

Permalink
Add release script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswilddev committed Jun 28, 2024
1 parent bf194aa commit 4410819
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Continuous Integration
on:
push:
pull_request:
release:
types: [created]
jobs:
lint-and-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '21.7'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run-script lint
- run: npm run-script build
release:
if: github.event_name == 'release' && github.event.action == 'created'
needs: lint-and-build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '21.7'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run-script build
- run: echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > ${NPM_CONFIG_USERCONFIG}
- run: "sed -i \"s/\\\"version\\\": \\\"0.0.0\\\",/\\\"version\\\": \\\"${GITHUB_REF/refs\\/tags\\/v/}\\\",/g\" package.json"
- run: npm publish
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -995,3 +995,7 @@ matching the predicate is given the CSS class `table-active`:
This package uses [ESLint](https://eslint.org/) for linting of JS/X. You can run ESLint at any time by executing `npm run-script lint-fix`. Install the [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) to get real-time linting in Visual Studio Code.

These linters additionally run in continuous integration as a GitHub Action.

### Releases

To release a new version of this package, simply [create a new release](https://github.com/langleyfoxall/react-dynamic-data-table/releases/new).
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@code-based/react-dynamic-data-table",
"version": "7.18.0",
"version": "0.0.0",
"description": "Re-usable data table for React with sortable columns, pagination and more.",
"keywords": [
"react",
Expand Down

0 comments on commit 4410819

Please sign in to comment.