Skip to content

Commit

Permalink
Merge pull request #1289 from ml5js/joeyklee.devops-publish-workflow
Browse files Browse the repository at this point in the history
chore: testing automation
  • Loading branch information
joeyklee authored Feb 3, 2022
2 parents 8799f57 + 7aa3db1 commit c40d6cc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 18 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/debugging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ jobs:
with:
node-version: "12.x"
registry-url: https://registry.npmjs.org/
- uses: release-drafter/release-drafter@v5
id: release_drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: release-drafter/release-drafter@v5
# id: release_drafter
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: pozetroninc/github-action-get-latest-release@master
id: latest_release
with:
repository: ${{ github.repository }}
- run: echo "bumping package to ${{ steps.latest_release.outputs.release }}"
# bump the package version
- run: echo "name ${{ steps.release_drafter.outputs.name }}"
# - run: echo "name ${{ steps.release_drafter.outputs.name }}"
# - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }}
# # update the readme
# - run: npm run update:readme
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ jobs:
with:
node-version: "12.x"
registry-url: https://registry.npmjs.org/
- uses: release-drafter/release-drafter@v5
id: release_drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "bumping package to ${{ steps.release_drafter.outputs.name }}"
- uses: ml5/github-action-get-latest-release@master
id: latest_release
with:
repository: ${{ github.repository }}
# - uses: release-drafter/release-drafter@v5
# id: release_drafter
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "bumping package to ${{ steps.latest_release.outputs.release }}"
# bump the package version
- run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }}
- run: npm run update:packageVersion ${{ steps.latest_release.outputs.release }}
# bump the readme
- run: npm run update:readme
# install packages
Expand All @@ -46,10 +50,10 @@ jobs:
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
branch: main
# build it!
- run: npm run build
# publish with the name - should only be the numbers like 0.9.5
- run: npm publish ${{ steps.release_drafter.outputs.name }}
- run: npm publish ${{ steps.latest_release.outputs.release }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github.






<p id="latest-version">

* You can use the latest version (0.9.3) by adding it to the head section of your HTML document:
* You can use the latest version (0.9.4) by adding it to the head section of your HTML document:

**v0.9.3**
**v0.9.4**

<script src="https://unpkg.com/[email protected].3/dist/ml5.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/[email protected].4/dist/ml5.min.js" type="text/javascript"></script>

</p data-id="latest-version">

Expand All @@ -86,6 +87,7 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github.







Expand Down
2 changes: 1 addition & 1 deletion 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": "ml5",
"version": "0.9.3",
"version": "0.9.4",
"description": "A friendly machine learning library for the web.",
"main": "dist/ml5.min.js",
"directories": {
Expand Down

0 comments on commit c40d6cc

Please sign in to comment.