diff --git a/.github/workflows/gh-pack.yml b/.github/workflows/gh-pack.yml index 7e69156..c3ced01 100644 --- a/.github/workflows/gh-pack.yml +++ b/.github/workflows/gh-pack.yml @@ -1,21 +1,36 @@ -name: Publish package to GitHub Packages +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: GitHub Packages Node.js Package + on: release: types: [created] + jobs: build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build runs-on: ubuntu-latest permissions: contents: read packages: write steps: - - uses: actions/checkout@v4 - # Setup .npmrc file to publish to GitHub Packages + - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '20.x' - registry-url: 'https://npm.pkg.github.com' + node-version: 16 + registry-url: https://npm.pkg.github.com/ - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec6db19..0f36f10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,5 +15,5 @@ jobs: - uses: actions/checkout@v3 - uses: ncipollo/release-action@v1 with: - artifacts: "*.tar.gz" - generateReleaseNotes: true \ No newline at end of file + generateReleaseNotes: true + makeLatest: true \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 485de09..a8524e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "shake-file", - "version": "1.0.9", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "shake-file", - "version": "1.0.9", + "version": "1.1.0", "license": "MIT" } } diff --git a/package.json b/package.json index c0232f7..4739440 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shake-file", - "version": "1.0.9", + "version": "1.1.0", "description": "Pure Javascript package for using the File System API", "main": "index.js", "scripts": {