Matheus Sampaio Queiroga
37d2c52a4e
Some checks failed
Teste / Test in node ${{ matrix.node }} (14.x) (push) Successful in 50s
Teste / Test in node ${{ matrix.node }} (15.x) (push) Failing after 37s
Teste / Test in node ${{ matrix.node }} (16.x) (push) Failing after 35s
Teste / Test in node ${{ matrix.node }} (17.x) (push) Failing after 35s
Teste / Test in node ${{ matrix.node }} (18.x) (push) Successful in 41s
Teste / Test in node ${{ matrix.node }} (19.x) (push) Successful in 38s
Teste / Test in node ${{ matrix.node }} (20.x) (push) Successful in 39s
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
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@v4
|
|
name: Code checkout
|
|
|
|
- uses: actions/setup-node@v4
|
|
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 }} |