This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
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
German
committed
Feb 7, 2023
1 parent
dcc72ec
commit 029f2c9
Showing
1 changed file
with
49 additions
and
0 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,49 @@ | ||
name: Publish ALPHA into NPM registry | ||
on: | ||
push: | ||
tags: | ||
- "publish-alpha-*" | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout files | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_TOKEN_WITH_PUSH }} | ||
|
||
- name: Config GIT user and email | ||
run: | | ||
git config user.name "$(git log -1 --pretty=format:'%an')" | ||
git config user.email "$(git log -1 --pretty=format:'%ae')" | ||
- name: Setup node version 10.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '10.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: NPM Build | ||
run: | | ||
npm ci | ||
npm i --save skill-testing-ml@alpha | ||
npm run test | ||
- name: Commit changes after update skill-testing-ml | ||
run: | | ||
git add . && git commit -m "Github Action: update skill-testing-ml" | ||
- name: NPM increment version for release | ||
run: npm version $(node -e "require('./publishing-toolkit.js').printNextAlphaVersion()") | ||
|
||
- name: GIT Pushing changes | ||
run: | | ||
git push | ||
git push --tags | ||
- name: NPM publish into registry | ||
run: | | ||
npm publish --tag latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |