Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Add Publish CI
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Sampaio Queiroga <[email protected]>
  • Loading branch information
Sirherobrine23 committed Aug 15, 2023
1 parent 5615686 commit 3995a32
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
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 }}
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
node-version: ${{ matrix.node }}
- run: npm install --no-save
- run: npm pack
name: Transpiler and Pack

0 comments on commit 3995a32

Please sign in to comment.