-
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
0 parents
commit f9ac0c8
Showing
6 changed files
with
3,205 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,6 @@ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
}, | ||
extends: "@avicenne-studio", | ||
}; |
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,47 @@ | ||
name: Publish NPM package | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
- v*.*.*-*-* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
registry-url: https://registry.npmjs.org | ||
cache: npm | ||
|
||
- name: Check tag version with package.json version | ||
run: | | ||
TAG_VERSION=$(echo $GITHUB_REF | sed -n 's/refs\/tags\/v\([0-9]*\.[0-9]*\.[0-9]*\(-[a-zA-Z0-9]*\)\?\)/\1/p') | ||
PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then | ||
echo "Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)" | ||
exit 1 | ||
fi | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Update version | ||
run: npm version $TAG_VERSION --allow-same-version | ||
|
||
- name: Publish to NPM | ||
run: npm publish --provenance --access=public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |
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 @@ | ||
node_modules |
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 @@ | ||
module.exports = "@avicenne-studio/prettier-config"; |
Oops, something went wrong.