diff --git a/.github/workflows/conventional-changelog.yml b/.github/workflows/conventional-changelog.yml deleted file mode 100644 index 90b27bd..0000000 --- a/.github/workflows/conventional-changelog.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: - push: - branches: - - master - -name: release-please -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v3 - with: - release-type: node - package-name: release-please-action diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 2367352..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,21 +0,0 @@ -on: - push: - branches: - - master - tags: - - "*" - -name: NPM publish -jobs: - publish: - runs-on: ununtu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm install - - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..184de47 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,30 @@ +on: + push: + branches: + - master + +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v3 + with: + release-type: node + package-name: release-please-action + # The logic below handles the npm publication: + - uses: actions/checkout@v2 + # these if statements ensure that a publication only occurs when + # a new release is created: + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v1 + with: + node-version: 16 + registry-url: "https://registry.npmjs.org" + if: ${{ steps.release.outputs.release_created }} + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }}