This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
-
-
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.
Signed-off-by: Matheus Sampaio Queiroga <[email protected]>
- Loading branch information
1 parent
5615686
commit 3995a32
Showing
2 changed files
with
39 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,38 @@ | ||
name: Publish neste | ||
on: | ||
release: | ||
types: | ||
- released | ||
- prereleased | ||
|
||
jobs: | ||
pack_package: | ||
runs-on: ubuntu-latest | ||
name: Publish neste | ||
env: | ||
PACKAGE_VERSION: ${{ github.ref }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Code checkout | ||
|
||
- uses: actions/setup-node@v3 | ||
name: Setup node.js | ||
with: | ||
node-version: 18.x | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Edit version and install depencies | ||
run: | | ||
sudo npm i -g semver | ||
VERSION="$(semver -c ${{ github.ref_name }})" | ||
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV | ||
jq --arg ver $VERSION '.version = $ver' package.json > package2.json | ||
mv -fv package2.json package.json | ||
# Install depencides and build | ||
npm install --no-save | ||
# Publish npm | ||
- run: npm publish --access public --tag ${{ github.event.release.prerelease && 'next' || 'latest' }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_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 |
---|---|---|
|
@@ -26,3 +26,4 @@ jobs: | |
node-version: ${{ matrix.node }} | ||
- run: npm install --no-save | ||
- run: npm pack | ||
name: Transpiler and Pack |