forked from kyle-ruan/react-algolia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: CSS-235 Some fix and deployment process
- Added CHANGELOG - Fixed package name - Added github workflow
- Loading branch information
1 parent
59385d8
commit 78e656e
Showing
3 changed files
with
94 additions
and
2 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,77 @@ | ||
name: publish-npm | ||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
paths: | ||
- '**' | ||
- .github/workflows/publish-npm.yml | ||
branches: | ||
- 'master' | ||
pull_request: | ||
paths: | ||
- '**' | ||
- .github/workflows/publish-npm.yml | ||
branches: | ||
- 'master' | ||
|
||
defaults: | ||
run: | ||
working-directory: . | ||
|
||
jobs: | ||
validate-npm: | ||
if: github.event_name == 'pull_request' | ||
runs-on: self-hosted | ||
container: acloudgurudevs/acg:16.13.2-alpine | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} # organization secret | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # organization secret | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Mark git checkout as safe | ||
run: git config --global --add safe.directory $GITHUB_WORKSPACE | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .tool-versions | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
|
||
- name: install dependencies | ||
run: | | ||
echo //registry.npmjs.org/:_authToken=$NPM_TOKEN > .npmrc | ||
yarn config set unsafe-perm true | ||
yarn install --frozen-lockfilec | ||
- name: Validate NPM | ||
run: yarn validate | ||
publish-npm: | ||
if: github.event.ref == 'refs/heads/master' | ||
runs-on: self-hosted | ||
container: acloudgurudevs/acg:16.13.2-alpine | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} # organization secret | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # organization secret | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: master | ||
|
||
- name: Mark git checkout as safe | ||
run: git config --global --add safe.directory $GITHUB_WORKSPACE | ||
|
||
- name: install dependencies | ||
run: | | ||
echo //registry.npmjs.org/:_authToken=$NPM_TOKEN > .npmrc | ||
yarn config set unsafe-perm true | ||
yarn install --frozen-lockfilec | ||
- name: Publish to NPM | ||
run: npm publish |
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,14 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
## [1.4.0] - 2023-10-17 | ||
|
||
### Added | ||
- Added CHANGELOG.md | ||
|
||
### Changed | ||
- Replaced react-scripts with tsup | ||
|
||
### Removed | ||
- Removed babel and its plugins | ||
- Removed unnecessary assets |
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