diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..7fb9ed9 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,33 @@ +on: + push: + branches: + - main +name: release-please +permissions: {} +jobs: + release-please: + permissions: + contents: write # to create release commit (google-github-actions/release-please-action) + pull-requests: write # to create release PR (google-github-actions/release-please-action) + + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - run: npm test + if: ${{ steps.release.outputs.release_created }} + + - uses: JS-DevTools/npm-publish@v3 + if: ${{ steps.release.outputs.release_created }} + with: + token: ${{secrets.NPM_TOKEN}} + access: public + provenance: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 42af8fb..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Release - -permissions: - contents: write - -on: - push: - tags: - - 'v*' - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set node - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - run: npx changelogithub - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.gitignore b/.gitignore index c2658d7..57b2a93 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ node_modules/ +*.tgz +pnpm-lock.yaml +package-lock.json diff --git a/README.md b/README.md index 4949c7a..3d90866 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # nrm-lite +[![npm](https://img.shields.io/npm/v/nrm-lite)](https://www.npmjs.com/package/nrm-lite)  [![install size](https://packagephobia.com/badge?p=nrm-lite)](https://packagephobia.com/result?p=nrm-lite) + Simple and lightweight replacement for nrm. Like [dnrm](https://github.com/markthree/dnrm), but in pure Node.js @@ -12,7 +14,7 @@ Like [dnrm](https://github.com/markthree/dnrm), but in pure Node.js ## Install ```sh -# install `nrml` command globally +# install the `nrml` command globally npm install -g nrm-lite nrml --help