-
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.
- Loading branch information
Showing
3 changed files
with
11 additions
and
47 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 |
---|---|---|
|
@@ -15,48 +15,7 @@ on: | |
|
||
jobs: | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout 💼 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js 🧩 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Check for critical vulnerabilities 🔎 | ||
run: npm audit --audit-level critical --omit=dev | ||
|
||
- name: Install dependencies 📦 | ||
run: npm ci | ||
|
||
- name: Run tests 🧪 | ||
run: npm test | ||
|
||
- name: Build 🏗️ | ||
run: npm run build | ||
|
||
- name: Bump version 📈 | ||
id: version | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
NEW_VERSION=$(npm version ${{ inputs.version }} --message $'Update version to %s\n\nAutomated version bump by GitHub Action.') | ||
git push --follow-tags --no-verify | ||
echo "new-version=${NEW_VERSION}" >> $GITHUB_OUTPUT | ||
if: inputs.version && inputs.version != 'none' | ||
|
||
- name: Set up NPM 🔑 | ||
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" | ||
|
||
- name: Publish 🚀 | ||
run: npm publish --access public | ||
|
||
- name: Create release ⛩️ | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ steps.version.outputs.new-version }} | ||
uses: infinitaslearning/workflow-publish-public-module/.github/workflows/publish-module.yaml@v1 | ||
with: | ||
version: ${{ inputs.version }} | ||
secrets: inherit |
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,5 @@ | ||
### What's changed | ||
|
||
- Initial release | ||
|
||
--- |
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