-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edf4dba
commit a2d170f
Showing
1 changed file
with
35 additions
and
11 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 |
---|---|---|
|
@@ -21,20 +21,44 @@ jobs: | |
id: release | ||
uses: manovotny/[email protected] | ||
|
||
- uses: actions/setup-node@v2 | ||
### Install if no cache exists ### | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14.x' | ||
cache: 'npm' | ||
- run: npm ci --ignore-scripts | ||
node-version: ${{ matrix.node-version }} | ||
cache: "yarn" | ||
- run: yarn install --silent --frozen-lockfile | ||
|
||
### Build if no cache exists ### | ||
- name: Cache Build | ||
id: cache-build | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/dist | ||
key: ${{ github.sha }}-dist | ||
- name: Run Build | ||
if: steps.cache-build.outputs.cache-hit != 'true' | ||
run: yarn build | ||
|
||
# build cache | ||
- name: Build cache | ||
id: cache-build | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/dist | ||
key: ${{ github-sha }}-dist | ||
|
||
- run: git config --global user.email ${{ secrets.EMAIL }} | ||
- run: git config --global user.name ${{ secrets.USERNAME }} | ||
- run: npm version --newversion --allow-same-version ${{ steps.release.outputs.version }} --tag ${{ steps.release.outputs.tag }} | ||
- run: npm pack | ||
- name: Upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: package | ||
path: "*.tgz" | ||
# - run: npm pack | ||
# - name: Upload | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: package | ||
# path: "*.tgz" | ||
|
||
publish: | ||
name: "Publish to GitHub Packages and NPM" | ||
|
@@ -54,7 +78,7 @@ jobs: | |
uses: actions/download-artifact@v2 | ||
with: | ||
name: package | ||
- run: npm publish --access public $(ls *.tgz) | ||
- run: npm publish --access public dist/ngds-toolkit | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# - uses: actions/setup-node@v2 | ||
|